Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="https://groups.yahoo.com/neo/groups/rest-discuss/conversations/messages/9962" rel="noreferrer">Roy Fielding's comment about including a body with a GET request</a>. </p> <blockquote> <p>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.</p> <p>So, yes, you can send a body with GET, and no, it is never useful to do so.</p> <p>This is part of the layered design of HTTP/1.1 that will become clear again once the spec is partitioned (work in progress).</p> <p>....Roy</p> </blockquote> <p>Yes, you can send a request body with GET but it should not have any meaning. If you give it meaning by parsing it on the server and <em>changing your response based on its contents</em>, then you are ignoring this recommendation in <a href="https://tools.ietf.org/html/rfc2616#section-4.3" rel="noreferrer">the HTTP/1.1 spec, section 4.3</a>:</p> <blockquote> <p>[...] if the request method does not include defined semantics for an entity-body, then the message-body <a href="https://www.ietf.org/rfc/rfc2119.txt" rel="noreferrer">SHOULD</a> be ignored when handling the request.</p> </blockquote> <p>And the description of the GET method in <a href="https://tools.ietf.org/html/rfc2616#section-9.3" rel="noreferrer">the HTTP/1.1 spec, section 9.3</a>:</p> <blockquote> <p>The GET method means retrieve whatever information ([...]) is identified by the Request-URI.</p> </blockquote> <p>which states that the request-body is not part of the identification of the resource in a GET request, only the request URI.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload