# HTTP node help (beginner)

**URL:** <https://discourse.nodered.org/t/http-node-help-beginner/72419>\
**Category:** General\
**Created:** [19 December 2022 13:00 UTC](https://discourse.nodered.org/t/http-node-help-beginner/72419 "2022-12-19T13:00:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![markost](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@markost](https://discourse.nodered.org/u/markost)\
**Post date:** [19 December 2022 13:00 UTC](https://discourse.nodered.org/t/http-node-help-beginner/72419/1 "2022-12-19T13:00:40Z")

</div>

Hello, I am new to http nodes and need help from more experienced users.

With inject I send data (POST) to the URL to the [RequestBin.com](http://RequestBin.com) endpoint.  
These data are properly displayed there (picture attached).

 ![capture_1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/b/fbf64d5549edac7f54681980c06aa72712d7f4ec.jpeg)

How to get this data in Node-RED?  
Thx!

---

<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:** [19 December 2022 13:14 UTC](https://discourse.nodered.org/t/http-node-help-beginner/72419/2 "2022-12-19T13:14:27Z")

</div>

try the examples in the cookbook or the built in examples inside node-red

### cookbook

> **[Node-RED Cookbook : Node-RED](https://cookbook.nodered.org/#http-requests)**

### Built in examples

- Press `ctrl+i`
- select examples and browse to `http` section
- ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/46a7927bb07621e6984096d188b81123db11b5d3.png)

---

<div class="post-metadata">

**Author:** ![markost](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@markost](https://discourse.nodered.org/u/markost)\
**Post date:** [19 December 2022 15:10 UTC](https://discourse.nodered.org/t/http-node-help-beginner/72419/3 "2022-12-19T15:10:12Z")

</div>

Hello and thanks for the reply @Steve\_Mcl!

I tried this example before asking the question, but no luck.

I made changes to the "http in" and "http request" nodes (changed URL).

An image with the debug response is attached, as is the flow.

 ![example_ok_and_nok](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/1/113c2dd240ffeed149f645324d0b724be8a73974.jpeg)

Web browser information OK.

 ![raw_data_browser](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/9/9921f821a673deba065cc9c6baaf73101abc1f88.jpeg)

```auto
[{"id":"8f528d7e22867b51","type":"group","z":"15904f1436604ab2","name":"my endpoint (https://en0pnjpo24h70g.x.pipedream.net/hello-raw)","style":{"stroke":"#ff0000","fill":"#ffefbf","label":true,"color":"#000000"},"nodes":["3ce0c09d9e543325","c4d19ae32053b33a","dbeec81a6782acce","ba9f40ecc666149f","2ce3da498b23315b","22e05bd0802a6632","b4e617bf57076714","b1dba1c0dd1a408e","f3bf891c742fd017"],"x":154,"y":4339,"w":792,"h":222},{"id":"3ce0c09d9e543325","type":"http in","z":"15904f1436604ab2","g":"8f528d7e22867b51","name":"","url":"https://en0pnjpo24h70g.x.pipedream.net/hello-raw","method":"post","upload":false,"swaggerDoc":"","x":390,"y":4420,"wires":[["22e05bd0802a6632","f3bf891c742fd017"]]},{"id":"c4d19ae32053b33a","type":"http response","z":"15904f1436604ab2","g":"8f528d7e22867b51","name":"","statusCode":"","headers":{},"x":870,"y":4420,"wires":[]},{"id":"dbeec81a6782acce","type":"comment","z":"15904f1436604ab2","g":"8f528d7e22867b51","name":"Post data to a flow","info":"The `HTTP In` node can listen for POST requests. It returns the posted data as `msg.payload`.\n\nSee Node-RED cookbook items(\n[post raw data(https://cookbook.nodered.org/http/post-raw-data-to-a-flow), [post form data](https://cookbook.nodered.org/http/post-form-data-to-a-flow), [post JSON data](https://cookbook.nodered.org/http/post-json-data-to-a-flow)\n) for details.","x":270,"y":4380,"wires":[]},{"id":"ba9f40ecc666149f","type":"http request","z":"15904f1436604ab2","g":"8f528d7e22867b51","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://en0pnjpo24h70g.x.pipedream.net/hello-raw","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":430,"y":4520,"wires":[["2ce3da498b23315b"]]},{"id":"2ce3da498b23315b","type":"debug","z":"15904f1436604ab2","g":"8f528d7e22867b51","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":590,"y":4520,"wires":[]},{"id":"22e05bd0802a6632","type":"template","z":"15904f1436604ab2","g":"8f528d7e22867b51","name":"page","field":"payload","fieldType":"msg","format":"html","syntax":"mustache","template":"<html>\n <head></head>\n <body>\n <h1>Hello {{payload}}</h1>\n </body>\n</html>","output":"str","x":710,"y":4420,"wires":[["c4d19ae32053b33a"]]},{"id":"b4e617bf57076714","type":"inject","z":"15904f1436604ab2","g":"8f528d7e22867b51","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Nick","payloadType":"str","x":270,"y":4520,"wires":[["ba9f40ecc666149f"]]},{"id":"b1dba1c0dd1a408e","type":"comment","z":"15904f1436604ab2","g":"8f528d7e22867b51","name":"Send HTTP POST request:https://en0pnjpo24h70g.x.pipedream.net/hello-raw","info":"","x":470,"y":4480,"wires":[]},{"id":"f3bf891c742fd017","type":"debug","z":"15904f1436604ab2","g":"8f528d7e22867b51","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":710,"y":4380,"wires":[]},{"id":"b2e169590b3b5cb0","type":"group","z":"15904f1436604ab2","name":"from example (local)","style":{"stroke":"#0070c0","fill":"#c8e7a7","label":true,"color":"#000000"},"nodes":["f0faf778673f3466","e371caf77af8e636","80764fe30bb7af60","9e3c917120360e4d","dbae30acdea76549","c2918ec53144541e","2907c829cba86ea7","6d9dcb5c36d43db9","ad202ed68a5a8f0f"],"x":154,"y":4099,"w":552,"h":222},{"id":"f0faf778673f3466","type":"http in","z":"15904f1436604ab2","g":"b2e169590b3b5cb0","name":"","url":"/hello-raw","method":"post","upload":false,"swaggerDoc":"","x":260,"y":4180,"wires":[["c2918ec53144541e","ad202ed68a5a8f0f"]]},{"id":"e371caf77af8e636","type":"http response","z":"15904f1436604ab2","g":"b2e169590b3b5cb0","name":"","statusCode":"","headers":{},"x":610,"y":4180,"wires":[]},{"id":"80764fe30bb7af60","type":"comment","z":"15904f1436604ab2","g":"b2e169590b3b5cb0","name":"Post data to a flow","info":"The `HTTP In` node can listen for POST requests. It returns the posted data as `msg.payload`.\n\nSee Node-RED cookbook items(\n[post raw data(https://cookbook.nodered.org/http/post-raw-data-to-a-flow), [post form data](https://cookbook.nodered.org/http/post-form-data-to-a-flow), [post JSON data](https://cookbook.nodered.org/http/post-json-data-to-a-flow)\n) for details.","x":270,"y":4140,"wires":[]},{"id":"9e3c917120360e4d","type":"http request","z":"15904f1436604ab2","g":"b2e169590b3b5cb0","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://localhost:1880/hello-raw","tls":"","persist":false,"proxy":"","authType":"","credentials":{},"x":430,"y":4280,"wires":[["dbae30acdea76549"]]},{"id":"dbae30acdea76549","type":"debug","z":"15904f1436604ab2","g":"b2e169590b3b5cb0","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":610,"y":4280,"wires":[]},{"id":"c2918ec53144541e","type":"template","z":"15904f1436604ab2","g":"b2e169590b3b5cb0","name":"page","field":"payload","fieldType":"msg","format":"html","syntax":"mustache","template":"<html>\n <head></head>\n <body>\n <h1>Hello {{payload}}</h1>\n </body>\n</html>","output":"str","x":450,"y":4180,"wires":[["e371caf77af8e636"]]},{"id":"2907c829cba86ea7","type":"inject","z":"15904f1436604ab2","g":"b2e169590b3b5cb0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Nick","payloadType":"str","x":270,"y":4280,"wires":[["9e3c917120360e4d"]]},{"id":"6d9dcb5c36d43db9","type":"comment","z":"15904f1436604ab2","g":"b2e169590b3b5cb0","name":"Send HTTP POST request: http://localhost:1880/hello-raw","info":"","x":410,"y":4240,"wires":[]},{"id":"ad202ed68a5a8f0f","type":"debug","z":"15904f1436604ab2","g":"b2e169590b3b5cb0","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":450,"y":4140,"wires":[]}]

```

---

<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:** [19 December 2022 15:58 UTC](https://discourse.nodered.org/t/http-node-help-beginner/72419/4 "2022-12-19T15:58:50Z")

</div>

ok, so I have made some assumptions - 1 being this instance of node-red is NOT running on the same server as `https://en0pnjpo24h70g.x.pipedream.net/hello-raw`?

The HTTP-In creates a callable endpoint on the NODE-RED server - it does not provide a way to intercept calls to another server or another application on a different port.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/c/4c3a7a1fe387e724ac2ac7f66266f92aac682f6e.jpeg)

Does that make sense?

---

<div class="post-metadata">

**Author:** ![markost](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@markost](https://discourse.nodered.org/u/markost)\
**Post date:** [19 December 2022 16:31 UTC](https://discourse.nodered.org/t/http-node-help-beginner/72419/5 "2022-12-19T16:31:35Z")

</div>

Makes sense.  
So it is normal that it does not work for the given example.  
Thank you for the explanation!

---

<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:** [2 January 2023 16:32 UTC](https://discourse.nodered.org/t/http-node-help-beginner/72419/6 "2023-01-02T16:32:00Z")

</div>

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