POST request to Traccar demoserver

Hello guys!
Trying to get geo info fron Traccar demo server via POST request. Trying http request node and get mistake:

> The @FormParam is utilized when the content type of the request entity is not application/x-www-form-urlencoded - IllegalStateException (...)

Sadly I don't know the reason why an error occurs. Any ideas what is wrong with my flow?

[{"id":"ef0c06c9.de28a8","type":"inject","z":"11a9e76c.e4d6c9","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":80,"wires":[["8041512.e287fb","1bc48c3c.af21a4","d763b77a.a4e3a8","abcc11b1.831ef"]]},{"id":"d763b77a.a4e3a8","type":"http request","z":"11a9e76c.e4d6c9","name":"","method":"POST","ret":"txt","paytoqs":false,"url":"http://demo5.traccar.org/api/session?token=7iHFLJysPzhqj5jt5FVXRTWYlvE0JKn9","tls":"","proxy":"","authType":"basic","x":390,"y":80,"wires":[["1de5dd9f.4d9022"]]},{"id":"1de5dd9f.4d9022","type":"debug","z":"11a9e76c.e4d6c9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":80,"wires":[]}]

You are not posting anything. The request node is only using the post url, now you need to add parameters.

Chang the http request node to GET, it works.

Note, for security replace your token with something arbitrary and get a new token.

Thank you very much!

made a flow
https://flows.nodered.org/flow/67c9ccfdde00acbca51c99602cebc008

1 Like