node-red / cookbook.nodered.org

Node-RED Cookbook
http://cookbook.nodered.org
Apache License 2.0
84 stars 34 forks source link

Feedback on 'Post JSON data to a flow' #76

Closed ddevashish closed 3 years ago

ddevashish commented 4 years ago

There is no any Json implemented in the example

knolleary commented 4 years ago

Hi @ddevashish

can you explain a bit more what you mean?

The recipe shows how you can create a flow that accepts JSON data that is posted to it via an HTTP request.

It includes an example curl command that can be used to send the POST with the JSON data {"name":"Nick"}.

ddevashish commented 4 years ago

Title shows 'Post Json data to a flow'

But there is no any JSON object or json node available in the example

[{"id":"5b98a8ac.a46758","type":"http in","z":"3045204d.cfbae","name":"","url":"/hello-form","method":"post","swaggerDoc":"","x":120,"y":820,"wires":[["bba61009.4459f"]]},{"id":"bba61009.4459f","type":"template","z":"3045204d.cfbae","name":"page","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\n \n \n

Hello {{ payload.name }}!

\n \n","x":290,"y":820,"wires":[["6ceb930a.93146c"]]},{"id":"6ceb930a.93146c","type":"http response","z":"3045204d.cfbae","name":"","x":430,"y":820,"wires":[]}]

knolleary commented 4 years ago

Correct. The recipe is about creating a flow that can receive an HTTP Post containing JSON data.