# Using a node inside a custom node

**URL:** https://discourse.nodered.org/t/using-a-node-inside-a-custom-node/25727
**Category:** General
**Created:** [29 April 2020 09:27 UTC](https://discourse.nodered.org/t/using-a-node-inside-a-custom-node/25727 "2020-04-29T09:27:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![aperez](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aperez/32/20893_2.png) [@aperez](https://discourse.nodered.org/u/aperez)
#### Post date: [29 April 2020 09:27 UTC](https://discourse.nodered.org/t/using-a-node-inside-a-custom-node/25727/1 "2020-04-29T09:27:39Z")

</div>

I would like to create custom node that works with a specific framework. That framework needs to be iconfigured/consumed using REST. No to "reinvent the wheel", Is there any way to use www.request node from inside the custom node?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [29 April 2020 09:30 UTC](https://discourse.nodered.org/t/using-a-node-inside-a-custom-node/25727/2 "2020-04-29T09:30:51Z")

</div>

Yes. Add your preferred library in the package.json dependencies.

I would probably recommend against `request` as it is in maintenance mode.

Choose got or axios instead 👍

---

<div class="post-metadata">

### Author: ![aperez](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aperez/32/20893_2.png) [@aperez](https://discourse.nodered.org/u/aperez)
#### Post date: [29 April 2020 09:50 UTC](https://discourse.nodered.org/t/using-a-node-inside-a-custom-node/25727/3 "2020-04-29T09:50:50Z")

</div>

Thank you for the fast reply!

I was asking not for a nodejs library but for a node-red node. I think it would be interesting if it was possible to use a node so I could pass "msg" with all request information and receive the response the same way.

If not for sure I would use _axios_, thanks for the recommendation.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [28 June 2020 09:51 UTC](https://discourse.nodered.org/t/using-a-node-inside-a-custom-node/25727/4 "2020-06-28T09:51:10Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
