Just because the HTTP protocol doesn't define the semantics doesn't mean 
that RESTful services aren't allowed to take this on themselves, and some 
do.  Kinda like in the US where rights not reserved for the federal 
government fall to the states.

ElasticSearch is one such 
example: 
http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html.
 
 

They use GET bodies for the REST calls in which they are performing a 
search given a complex JSON DSL.  Commonly this would be performed with a 
GET with request params.  They support this to a certain degree, but they 
also have an extremely rich JSON DSL for modeling complex queries/filters. 
 This DSL would hard or impossible to express via request params, and since 
this is still fundamentally a GET operation, they support JSON as the 
request body.

They also support POST as a fallback to work around broken/proper (depends 
on your point of view I guess) clients.  So, in some of my apps I could 
revert to this POST fallback.  However, some services are service wrappers 
around ES.  They provide their own additional functionality to existing ES 
REST APIs, but attempt to not interfere with existing call semantics.  So 
if their clients are sending GET search requests, they need to be able to 
accept those calls within their service and proxy them downstream.

With the advent of akka-streams and akka-http this proxy becomes even more 
robust, with better tools to describe data flows and handle backpressure. 
 But only if GETs are allowed to have bodies.



-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to