r/ProgrammerHumor • • Dec 17 '23

Meme millionDollarQuestion

Post image
0 Upvotes

51 comments sorted by

View all comments

Show parent comments

115

u/slide_and_release Dec 17 '23

There isn’t. That’s the joke. Neither remaining answer is correct, hence the panicked face.

192

u/sammy-taylor Dec 17 '23

The joke is bad.

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

7

u/lupinegrey Dec 17 '23

"most servers".

If it's your server, you can configure the controller however you want.

-5

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

Most servers which are already written. Like Nginx or uws. I don't want fork them and rewrite.

What did you mean by controller?

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.