News for hackers. Stuff that matters.
Re:HTTP/1.1 just got a major update by saryant on Saturday June 07, 2014 @01:21AM (#7861380)
Elasticsearch: it accepts JSON bodies in GET requests to define the parameters of a search. These can get quite large so it's preferable to encoding everything in the query string. The operation is read-only, so an argument can be made that a GET makes more sense than a POST.

That said, I POST my search params to Elasticsearch anyways.

Re:HTTP/1.1 just got a major update by robryk on Saturday June 07, 2014 @05:40AM (#7861713)
Aren't message bodies on GET supposed not to impact the returned result at all?
Re:HTTP/1.1 just got a major update by colanderman on Saturday June 07, 2014 @09:54AM (#7862089)
Re:HTTP/1.1 just got a major update by Joeri on Saturday June 07, 2014 @08:07AM (#7861912)
Is that really restful though? If you need that many parameters to specify which resource you mean, you lose pretty much all of the benefit of a restful architecture.
Re:HTTP/1.1 just got a major update by acdha on Saturday June 07, 2014 @09:24AM (#7862021)
GET vs. POST is a question of whether the request is intended to change state. Using JSON for a query is nice for preserving structure (e.g. nesting a Boolean expressions, not needing PHP-style array notation, etc.) but it doesn't change the idea that it's a GET request which can safely be repeated without affecting server state, may be cached for other clients, etc.