3 ms·
> Can I send a large request body with a GET? Why not?
by jwilk 9y ago
> Can I send a large request body with a GET?
Why not?
- deniska 9y agoHTTP server following the spec can omit the body from a GET request.
- hamilyon2 9y agoI'd love to see a document defining this. I could not find such to the date.
- IanCal 9y agoI'm not too up on which documents here are current but at least: > A payload within a GET request message has no defined semantics; > sending a payload body on a GET request might cause some existing > implementations to reject the request. https://tools.ietf.org/html/rfc7231#section-4.3.1 https://tools.ietf.org/html/rfc7231#section-4.3.1
- jwilk 9y agoRFC 2616 §4.3 (https://tools.ietf.org/html/rfc2616#section-4.3 https://tools.ietf.org/html/rfc2616#section-4.3): if the request method does not include defined semantics for an entity-body, then the message-body SHOULD be ignored when handling the request. Now, RFC 2616 is obsolete, and I couldn't find such explicit wording in the superseding RFC 7231. But §4.3.1 (https://tools.ietf.org/html/rfc7231#section-4.3.1 https://tools.ietf.org/html/rfc7231#section-4.3.1) says: A payload within a GET request message has no defined semantics; sending a payload body on a GET request might cause some existing implementations to reject the request.
- niftich 9y agoA GET request's body has no defined semantics, so your server is firmly in the realm of "nonstandard implementation detail" if you choose to take into account the body in your decision-making.