Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Haha. Should’ve asked him about PATCH.
And be cursed people using “PATCH” in their APIs ! -
witchDev7743y@A4Abhiraj they are not. In a standard restful api design, each has its own purpose.
-
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. -
@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 ?) -
@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 -
@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.
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.
rant
technical screening
http questions