Hi folks,
I'm trying to pass some sensor values to an 'api.php' file as a HTTP request that is located on a remote web server. The request should be accepted by the 'api.php' using a _GET variable. I am trying to do this from node-red with the flow below.
Unfortunately, the request is sent but the API returns "No password provided".
When I enter the password into a browser as shown below it will return "Success". I'm not sure if I'm sending the HTTP request from node-red as it should.
Any help is much appreciated.
Here's an example of a request URL that should be sent to the 'api.php' to pass the sensor values.
http://www.meteotemplate.com/template/api.php?U=1486255070&T=25.3&H=79.9&P=1010.1&W=5.6&G=7.8&R=0&RR=0&B=272&S=788&PASS=password123
The flow:
[{"id":"fdb1688a952261c8","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"dfdd6bff9cfd8e90","type":"inject","z":"fdb1688a952261c8","name":"","props":[{"p":"headers.content-type","v":"application/x-www-form-urlencoded","vt":"str"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"PASS=2ngT25CsDipY&U=1648939207069&T=23.5&H=60&P=1005.14&W=0&B=0","payloadType":"str","x":370,"y":220,"wires":[["359689d7cdbaf3d0","a972f3c9a3e86ce3"]]},{"id":"a972f3c9a3e86ce3","type":"http request","z":"fdb1688a952261c8","name":"","method":"POST","ret":"txt","paytoqs":"body","url":"https://skynstars.com/template/api.php?","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":550,"y":220,"wires":[["c37929e0b6c8579c"]]},{"id":"359689d7cdbaf3d0","type":"debug","z":"fdb1688a952261c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":550,"y":180,"wires":[]},{"id":"c37929e0b6c8579c","type":"debug","z":"fdb1688a952261c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":730,"y":220,"wires":[]}]
The Inject node structure looks like this: