# How to do http request from contrib node

**URL:** https://discourse.nodered.org/t/how-to-do-http-request-from-contrib-node/19769
**Category:** General
**Created:** [31 December 2019 06:27 UTC](https://discourse.nodered.org/t/how-to-do-http-request-from-contrib-node/19769 "2019-12-31T06:27:33Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [31 December 2019 10:59 UTC](https://discourse.nodered.org/t/how-to-do-http-request-from-contrib-node/19769/5 "2019-12-31T10:59:59Z")

</div>

You can always have a look at one of the existing http request related contributions, to have an example of what Nick has just explained...

For example the **node-red-contrib-http-request** node has the following two dependencies in its [package.json](https://github.com/spawnrider/node-red-contrib-http-request/blob/master/package.json) file:

```auto
  "dependencies": {
    "request": "^2.74.0",
    "mustache": "^2.2.1"
  },

```

As a result, the request-library will be downloaded and installed automatically (when users install that custom node).

In this [document](https://docs.npmjs.com/misc/semver#caret-ranges-123-025-004) you can read about the semantic versioning syntax (for [major, minor, patch] ), which you can use in your package.json file dependencies section. E.g. in the above package.json file they have used `^` , which means a [caret range](https://docs.npmjs.com/misc/semver#caret-ranges-123-025-004): the contribution needs **minimal** version 2.74.0 but all **higher** 2.x.x versions are allowed. But it _doesn't_ allow a higher **major** version 3.x.x because major version might break backwards compatibility (so it might cause this contribution to fail).

That is what I understand from it ...

---

_[View the full topic](https://discourse.nodered.org/t/how-to-do-http-request-from-contrib-node/19769)._
