by voidlogic · 11y ago · 0 comments
GETs can have bodies--- its just that some people who write software forget this.
A simple solution is to put a hash or maybe even just a body content length in the query string or a header so the server can make sure the body made it to it. If the the body doesn't make it, then it can inform the client retry with another less ideal HTTP method.
Yes. In other words, any HTTP request message is allowed to contain a message body,
and thus must parse messages with that in mind. Server semantics for GET, however,
are restricted such that a body, if any, has no semantic meaning to the request.
The requirements on parsing are separate from the requirements on method
semantics.
So, yes, you can send a body with GET, and no, it is never useful to do so.
This is part of the layered design of HTTP/1.1 that will become clear again once
the spec is partitioned (work in progress).
....Roy
[1] -- http://stackoverflow.com/questions/978061/http-get-with-requ...Edit: As I mentioned on another follow up, you may need to vary on your checksum header to play nice with proxy caches, etc. Or mark your responses as uncachable.
So for example: QUERY example.com/api/thing ('{"thing_id": 00335}'::json)