Option to send GET request body · Issue #131 · postmanlabs/postman-app-support
@congruityservice is right; I can say from having used current versions of Elasticsearch that this feature is no longer a requirement as you can send the same request that you would send with a GET with a POST instead and it will work identically.
Now, to sort something out about the HTTP/1.1 specification:
RFC 2616, section 4.3 clearly states:
A message-body MUST NOT be included in a request if the specification of the request method (section 5.1.1) does not allow sending an entity-body in requests.
https://tools.ietf.org/html/rfc2616#section-4.3
However, in the entirety of section 9.3, the section defining the GET verb, nothing prevents a GET request from having a body.
But before you draw any conclusions - the functionality defined for the GET verb also does not include any logic involving the message body.
In other words, if we are to follow the specification:
- It is possible to send a message body with a GET request per specification.
- However, the server responding to the GET request must ignore the body to follow the standard.
Essentially, there is no point, per standard, to send a body with a GET request, even though it is not explicitly disallowed.
Roy T. Fielding backs this interpretation up:
...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.
https://groups.yahoo.com/neo/groups/rest-discuss/conversations/messages/9962
Taking all of this into consideration, I believe this issue should be closed as adding this functionality should have no effect or use per standard. Elasticsearch, though a great product, should not dictate how the HTTP standard is to be or not to be enforced.
Read full article from Option to send GET request body · Issue #131 · postmanlabs/postman-app-support
No comments:
Post a Comment