Postman HTTP GET request is functioning, Node-RED returning 'RequestError: Parse Error: Invalid header value char :'

Hello,

In the flow below, I am attempting to do a simple HTTP GET Request however I keep receiving the following error; ''RequestError: Parse Error: Invalid header value char :'. For this flow I have set the headers directly in the HTTP Request node however I have also attempted to set these headers separately but receive the same result (see image below).

When performing the GET request within PostMan, I receive the desired results with the same headers I have configured within my flow. Is there something I am missing?

[{"id":"32279fb8fd24e4fc","type":"http request","z":"7b18e84eb4b256de","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://10.35.136.33/MD/SUMMARY.DG?_TEMPLATE=FRS:SUMMTMP","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Accept-Encoding","valueType":"other","valueValue":"gzip, deflate, br"},{"keyType":"other","keyValue":"Connection","valueType":"other","valueValue":"keep-alive"},{"keyType":"other","keyValue":"Cookie","valueType":"other","valueValue":"lang=eng; unit=eng; cid=mcma; un=admin; al=1; login_state=1"},{"keyType":"other","keyValue":"Accept","valueType":"other","valueValue":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},{"keyType":"other","keyValue":"Referer","valueType":"other","valueValue":"http://10.35.136.33/"},{"keyType":"other","keyValue":"Cache-Control","valueType":"other","valueValue":"max-age=0"},{"keyType":"other","keyValue":"Accept-Language","valueType":"other","valueValue":"en-US,en;q=0.9"}],"credentials":{},"x":605,"y":375,"wires":[["86099e479e4ecdc6"]]}]

Have you tried encoding the url, as certain characters must be encoded in query string.

encodeURI yields the same result & encodeURIComponent returns a 'TypeError: Invalid URL'

Can you export and post the curl of the working postman request.

As requested. Thanks for the assistance.

curl --location 'http://10.35.136.33/MD/SUMMARY.DG' \
--header 'Cookie: lang=eng; unit=eng; cid=mcma; un=admin; al=1; login_state=1' \
--header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
--header 'Referer: http://10.35.136.33/' \
--header 'Cache-Control: max-age=0' \
--header 'Accept-Language: en-US,en;q=0.9'

No seeing the issue sorry. The only difference I see is your node-red request has a query string and the curl does not.

Ill keep playing with it. Thanks anyways @E1cid !

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