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
-
C0D4669025yIt can be at times, double handling data can be a pain if you need to send over a put.
-
fuckwit12165y@hoch10 that should be all HTTP verbs as far as I am concerned:
GET
POST
PUT
PATCH
DELETE
HEAD
CONNECT
OPTIONS
TRACE -
C0D4669025y@SZenC
trace is used for debugging, usually turned off on prod servers and outputs any inputs.
As for Connect, I think this is clearer then I'm going to be able explain it.
https://developer.mozilla.org/en-US... -
@kescherRant afaik it's actually the HTML standard not the browser implementation.
-
@C0D4 I’ve used connect in proxy chains before. I’m sure that link mentioned that, but clicking it would open a new tab in chrome and I already have so many that the count shows as a smiley face. Think it’s trying to tell me something, maybe I should open more tabs after all
-
@fuckwit PATCH is my favorite. If I see it ANYWHERE on API docs, I push out compagnie to drop this vendor immediately. Too much work on client side.
-
SZenC8155y@NoToJavaScript how is PATCH too much work? If you use proper libraries, you shouldn't have to change one or two lines to move from POST or PUT to PATCH
-
@SZenC Workflow with APIs without already “ready” library. (If there is already a lib, I don’t care how it sends my data as long as it’s easy to use)
Without patch :
Get object
Change a field
Put the same object
With patch :
Get object
Change a field
Generate a dynamic object which contains only edited fields. Basically you are doing vendor’s job at validating changes
Patch object.
Why should I do their work ? It’s vendor’s job to detect changes. Ease of use will always trump performances (Well, up to certain point, but ig we are talking 50ms difference, I’m fine with simpler way). Ofcause, I agree that for performance and traffic PATCH is great. -
SZenC8155y@NoToJavaScript Most of the time, I'm already getting diff-objects from downstream, so building a PATCH is trivial. But if you get full objects from your downstream, I can understand how a PUT would better suit your needs.
Kinda dumb that HTML forms don't support all of the HTTP methods (Only GET and POST!)
rant