I have a device which runs a web browser ( ESP8266 ) with sensors collecting electricity values. The device runs a basic http Query API which can be triggered via browser and the payload is either Json or CSV.
In my very basic first attempt with Node-Red i have started with an "Inject node" ( because i cannot figure out how to run a http node without "inject" - anyway Node flow for test is "Inject / HTTP Request / Debug " ( see screenshot ).
@knolleary@dceejay - I tried the same Query with Thingsboard "rest API call" now and dont get any errors. So i am hoping its something small that i am overlooking in NR?
Well it means that there is something wrong with the response from the server - normally it means the header is incorrect. I see that it does include a length (108267 bytes) - is the response exactly that long ?
this is the length of the response from just the url , which serves up a html page. I just posted this result to see that the http was infact 1.1 to exclude Nicks theory.
In my query i can set Header=yes / no , either give the "HPE invalid constant".
Is there perhaps a different node i could try to troubleshoot or approach from a different angle?
The http-request node uses the NodeJS request module.
If you have some basic NodeJS skills, you could use a small test script and track down the error outside of Node-RED first.
Good starting point would be the example from the docs.