Interestingly, if i change the header.content-type
to application/json; utf8
i get a 500 response.
if i just set in to application/json
, no errors.
[{"id":"b01e2692a2185d0f","type":"inject","z":"b001c4b1107b373a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"item\":\"abc\",\"item-2\":1}","payloadType":"json","x":330,"y":420,"wires":[["8402eece9cc5dfec"]]},{"id":"ce91f20a3a70105e","type":"http in","z":"b001c4b1107b373a","name":"","url":"/abctest123","method":"post","upload":false,"swaggerDoc":"","x":410,"y":300,"wires":[["0fe8486117b0b066","efe912a4186e9754"]]},{"id":"0fe8486117b0b066","type":"debug","z":"b001c4b1107b373a","name":"debug 454","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":650,"y":320,"wires":[]},{"id":"69ca006baebb0259","type":"http request","z":"b001c4b1107b373a","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"127.0.0.1:1880/abctest123","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":870,"y":460,"wires":[["6db7604fa9279cb5"]]},{"id":"6db7604fa9279cb5","type":"debug","z":"b001c4b1107b373a","name":"debug 455","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1070,"y":460,"wires":[]},{"id":"efe912a4186e9754","type":"http response","z":"b001c4b1107b373a","name":"","statusCode":"","headers":{},"x":630,"y":280,"wires":[]},{"id":"8402eece9cc5dfec","type":"function","z":"b001c4b1107b373a","name":"application/json","func":"msg.headers = {\n \"content-type\" : \"application/json\"\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":420,"wires":[["69ca006baebb0259"]]},{"id":"70dc6c0dad91eaa7","type":"function","z":"b001c4b1107b373a","name":"application/json; utf8","func":"msg.headers = {\n \"content-type\" : \"application/json; utf-8\"\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":460,"wires":[["69ca006baebb0259"]]},{"id":"996da7fe49d6a872","type":"function","z":"b001c4b1107b373a","name":"application/json; charset=utf8","func":"msg.headers = {\n \"content-type\" : \"application/json; charset=utf-8\"\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":570,"y":500,"wires":[["69ca006baebb0259"]]},{"id":"50ae0b8f1a201900","type":"inject","z":"b001c4b1107b373a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"item\":\"abc\",\"item-2\":1}","payloadType":"json","x":310,"y":460,"wires":[["70dc6c0dad91eaa7"]]},{"id":"e9a73537e7191510","type":"inject","z":"b001c4b1107b373a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"item\":\"abc\",\"item-2\":1}","payloadType":"json","x":310,"y":500,"wires":[["996da7fe49d6a872"]]}]