Folks, a while back other (smarter) people wrote a quick bit of code for me that uses the httprequest
node.
I'm wanting to use it again in a similar way but am getting nowhere - fast.
Every time I force a request, I get errors back.
Example flow:
[{"id":"89f681ae64bd6135","type":"inject","z":"65c9b63cb09879a0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":3350,"y":180,"wires":[["dcd80a56f41caa81"]]},{"id":"dcd80a56f41caa81","type":"http request","z":"65c9b63cb09879a0","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://discourse.nodered.org/","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Accept","keyValue":"","valueType":"text/plain","valueValue":""},{"keyType":"User-Agent","keyValue":"","valueType":"other","valueValue":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0"}],"x":3520,"y":180,"wires":[["3af232784383f3b8"]]},{"id":"3af232784383f3b8","type":"debug","z":"65c9b63cb09879a0","name":"debug 10","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":3680,"y":180,"wires":[]}]
I get back:
RequestError: The "listener" argument must be of type function. Received an instance of Object
and
{"_msgid":"fccdf90acf47169e","payload":"RequestError: The \"listener\" argument must be of type function. Received an instance of Object : https://discourse.nodered.org/","topic":"","statusCode":"ERR_INVALID_ARG_TYPE"}
Sorry, but I'm stuck.