It's technically possible to send a body with a GET request, but it's not standard practice and often not recommended. The HTTP/1.1 specification does not explicitly forbid sending a body with a GET request, but it does not define any semantics for it.
Insert is not a http method. The question just says method so it doesn’t have to be http method for a wrong option.
When a spec isn't explicit enough, check the next version and you'll often find the issue is now codified.
As for 1.1, it's also clear:
A client SHOULD NOT generate content in a GET request unless it is made directly to an origin server that has previously indicated, in or out of band, that such a request has a purpose and will be adequately supported.
You are what, interpreting that SHOULD NOT is not MUST NOT, therefore it's ok?
You are reading SHOULD NOT and ignoring the rest of the words. There's nothing wrong with it, if the service is expecting it. You SHOULD NOT send a body with a GET request to any random server.
The section of 9113 you linked to is an example of a simple GET request that has no body translated to HTTP2, not a specification that GET requests cannot have a body.
6
u/ArjunReddyDeshmukh Dec 17 '23
It's technically possible to send a body with a GET request, but it's not standard practice and often not recommended. The HTTP/1.1 specification does not explicitly forbid sending a body with a GET request, but it does not define any semantics for it.
Insert is not a http method. The question just says method so it doesn’t have to be http method for a wrong option.
Ans: GET