Setting payload for http PUT request?

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
rvhaasen
Posts: 7
Joined: 22 Mar 2015 23:38

Setting payload for http PUT request?

Post by rvhaasen »

Is it possible to specify a body for a http PUT request? The documentation says that a body can only be set for a POST. I'm writing a module that logs data to the Xively webservice. Xively requires PUT request with the data in the body of the http request. If this is not possible I can create a local proxy that translates a http-POST z-wave request to a http-PUT with the data as payload.... If it is somehow possible to specify body data that I would prefer that instead of making a proxy...
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: Setting payload for http PUT request?

Post by pofs »

If you're speaking of http.request, then payload for PUT requests is specified the same way as for POST requests.
Might be a bug in documentation.
rvhaasen
Posts: 7
Joined: 22 Mar 2015 23:38

Re: Setting payload for http PUT request?

Post by rvhaasen »

Thanks pofs, indeed the PUT does accept a body. I had i type in a header field. Now it works
Post Reply