Page 1 of 1

Setting payload for http PUT request?

Posted: 24 Mar 2015 19:01
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...

Re: Setting payload for http PUT request?

Posted: 24 Mar 2015 22:01
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.

Re: Setting payload for http PUT request?

Posted: 26 Mar 2015 13:19
by rvhaasen
Thanks pofs, indeed the PUT does accept a body. I had i type in a header field. Now it works