Hacker News new | past | comments | ask | show | jobs | submit login

Can I send a large request body with a GET? That's usually the reason I end up with POSTs.



> Can I send a large request body with a GET?

Why not?


A 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.


HTTP server following the spec can omit the body from a GET request.


I'd love to see a document defining this. I could not find such to the date.


RFC 2616 §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) 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.


I'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




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: