Need help with curl

unfortunately not, here's the flow I tried...

[{"id":"5f5ddec5.0b319","type":"inject","z":"dee1ee38.a66f9","name":"","props":[{"p":"payload.url","v":"https://www.youtube.com/watch?v=6jAb8Bzrs8U","vt":"str"},{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{}","payloadType":"json","x":270,"y":1340,"wires":[["8ae270f7.a50ac"]]},{"id":"8ae270f7.a50ac","type":"http request","z":"dee1ee38.a66f9","name":"","method":"POST","ret":"txt","paytoqs":"body","url":"http://192.168.0.2:8080/youtube-dl/q","tls":"","persist":false,"proxy":"","authType":"","x":730,"y":1340,"wires":[["ec958872.6803e8"]]},{"id":"ec958872.6803e8","type":"debug","z":"dee1ee38.a66f9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":910,"y":1340,"wires":[]},{"id":"fd802efe.8e94a","type":"change","z":"dee1ee38.a66f9","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$encodeUrl(\"url=\" & payload.url)","tot":"jsonata"},{"t":"set","p":"headers[\"content-type\"]","pt":"msg","to":" application/x-www-form-urlencoded","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":1340,"wires":[[]]}]

Your change node is not connect to the inject you bypassed the change

And in the change node you overwrite payload.url, when you set msg.payload to {}

I just assumed I had to use the same inject settings. So what exactly do I need to change?

just delete set msg.payoad to {}

If this is what you mean:

[{"id":"5f5ddec5.0b319","type":"inject","z":"dee1ee38.a66f9","name":"","props":[{"p":"payload.url","v":"https://www.youtube.com/watch?v=6jAb8Bzrs8U","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":270,"y":1340,"wires":[["8ae270f7.a50ac"]]},{"id":"8ae270f7.a50ac","type":"http request","z":"dee1ee38.a66f9","name":"","method":"POST","ret":"txt","paytoqs":"body","url":"http://192.168.0.2:8080/youtube-dl/q","tls":"","persist":false,"proxy":"","authType":"","x":730,"y":1340,"wires":[["ec958872.6803e8"]]},{"id":"ec958872.6803e8","type":"debug","z":"dee1ee38.a66f9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":910,"y":1340,"wires":[]},{"id":"fd802efe.8e94a","type":"change","z":"dee1ee38.a66f9","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$encodeUrl(\"url=\" & payload.url)","tot":"jsonata"},{"t":"set","p":"headers[\"content-type\"]","pt":"msg","to":" application/x-www-form-urlencoded","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":1340,"wires":[[]]}]

It doesn't work

Your change node is unconnected drag it down to see.

1 Like

schoolboy error! :flushed:

Thanks, it's working

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