http post
-
Hi, I am able to post a bulk request with this function node:
msg.url = "http://10.0.0.52:8080/bulk"; msg.headers =JSON.stringify({"content-type":"application/json"}); msg.payload = JSON.stringify({"group_queries": [{"device_types": ["temp"]}]}); return msg;in oder to get all 1-wire sensors.
But I have problems to write the code for setting relay 5 to on (post) or to write the code for getting the status of relay 5 (get).
Would very much appreciate your help in this case. -
solved it!
msg.url = "http://10.0.0.52:8080/json/relay/3"; msg.headers =JSON.stringify({"content-type":"application/json"}); msg.payload = JSON.stringify({"value": "1","timeout": "20"}); return msg; -
this works as well:
msg.url = "http://10.0.0.52:8080/json/relay/3"; msg.headers ='({"content-type":"application/json"})'; msg.payload = '({"value": "1","timeout": "20"})'; return msg;
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login