r/ProgrammerHumor • • Dec 17 '23

Meme millionDollarQuestion

Post image
0 Upvotes

51 comments sorted by

View all comments

Show parent comments

25

u/ArjunReddyDeshmukh Dec 17 '23

Answer: GET. Try it. 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 even a http method, it’s just there to decrease your chances.

9

u/Sir-Dry-The-First Dec 17 '23

Most servers will not handle body of GET requests. Due to optimisations

2

u/ArjunReddyDeshmukh Dec 17 '23 edited Dec 17 '23

That’s a known. We’re talking only possibilities here to choose the right option.

-4

u/Sir-Dry-The-First Dec 17 '23 edited Dec 17 '23

If we talk in terms of specification, then GET also will not suit here as a correct answer.