Welcome Guest, Not a member yet? Register   Sign In
Resource Routes - PUT vs PATCH
#12

(07-24-2017, 12:17 AM)Narf Wrote:
(07-21-2017, 04:37 PM)skunkbad Wrote: Flexible != Rigid REST API.

If you want flexible, GET and POST all the way home.

I have to disagree.

You are right to an extent that POST is "flexible" on its own, as you can do anything with it, but that doesn't mean it provides for a flexible API.

You'll need good API design skills (and design is hard) to produce a sane RESTful API, but it is the rigid simplicity that makes REST very flexible.
Shoe-horning everything into GET and POST is a common thing only because of how browsers and HTML forms work. You can get away with that when you only need a current version of your app to work, but that is a luxury that you don't have when building APIs and it turns into a maintenance hell.

Read up on what "idempotency" means and you should know what I mean. Smile

I'm pretty sure most of the APIs I've used were designed by either idiots or computer scientists that are so advanced they can no longer speak to other humans.

I did look up "idempotency", and it seems like something that I already expect for certain requests.

I'd like to see some examples of these sane RESTful APIs you speak of. Do you have any favorites?
Reply


Messages In This Thread
Resource Routes - PUT vs PATCH - by natanfelles - 07-20-2017, 06:15 PM
RE: Resource Routes - PUT vs PATCH - by Narf - 07-21-2017, 01:46 AM
RE: Resource Routes - PUT vs PATCH - by skunkbad - 07-21-2017, 04:37 PM
RE: Resource Routes - PUT vs PATCH - by kilishan - 07-22-2017, 08:02 PM
RE: Resource Routes - PUT vs PATCH - by ciadmin - 07-22-2017, 09:11 PM
RE: Resource Routes - PUT vs PATCH - by ciadmin - 07-22-2017, 10:04 PM
RE: Resource Routes - PUT vs PATCH - by Narf - 07-24-2017, 12:17 AM
RE: Resource Routes - PUT vs PATCH - by skunkbad - 07-24-2017, 01:50 PM
RE: Resource Routes - PUT vs PATCH - by Narf - 07-25-2017, 12:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB