6

I screen candidates for this freelancing company part time and i meet all kinds of people. I asked a self proclaimed senior engineer the difference between a get and a post request and he told me with the utmost confidence. “they are both the same”. That’s it. No other explanation was offered.
We were both just stared through the screen awkwardly.

Comments
  • 0
  • 0
    But aren't they?
  • 0
    That’s sad....
  • 0
    Haha. Should’ve asked him about PATCH.
    And be cursed people using “PATCH” in their APIs !
  • 0
    @A4Abhiraj they are not. In a standard restful api design, each has its own purpose.
  • 0
    @NoToJavaScript What's wrong with PATCH?
  • 0
    For anyone wondering what the difference is, a GET request is a request to receive data and a POST request contains data to be received.

    Example: your browser GETs a webpage and then POSTs your login details back to the server to let you login.
  • 0
    @homo-lorens

    It’s very difficult to implement in a strongly typed languages. AND requires some manual coding. For Example in C# you get out of box GetAsync and PostAsync (And some others), but not “patch”.
    And honestly, the only reason I see for using patch is to reduce the traffic. I prefer just PUT the whole object and be done with it. 1 line of code.
    Patch will require to properly manage serialization and being attentive to details (Who has the time for that ?)
  • 1
    @pythontrader

    Yes, but you hit the limit of Get pretty fast with complex filters etc.
    I see no problems for using POST for getting data if request object is complex
  • 0
    @witchDev it.was.a.joke.
  • 0
    @NoToJavaScript I use PATCH as an alternative to POST when representing "edit" actions. PUT is completely different as it is required to be idempotent, and therefore poses strict limitations on the API design. C# not supporting PatchAsync is incredibly stupid, it's literally the exact same as POST just with a different verb. There are 5 HTTP verbs and all tools I know understand all of them.
Add Comment