Http POST body - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Http POST body (/showthread.php?tid=4545) |
Http POST body - CristianAgata - 01.02.2023 Hi @ all, I need a little help for send a body in a script. I don't know way, if i send it via Postman it works and if I try via script, the answer it is 422 (error in body compose). This is my script: Code: https = require('ssl.https') RE: Http POST body - admin - 02.02.2023 Have you replaced "--devices ID--" with actual device id in the request URL? Remove log calls from inside the request table. Your JSON is incorrect, use json.encode to have a valid output: Code: test = json.encode({ RE: Http POST body - CristianAgata - 02.02.2023 (02.02.2023, 08:29)admin Wrote: Have you replaced "--devices ID--" with actual device id in the request URL?Hi admin, Thanks, I got. I will try and I let you know. Best regards Cristian RE: Http POST body - CristianAgata - 02.02.2023 (02.02.2023, 08:29)admin Wrote: Have you replaced "--devices ID--" with actual device id in the request URL?Hi admin, goods it works fine. Thank you so much. BR Cristian |