Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
bagfox102312dI mean, there are legitimate use cases, even if it’s very rare.
LLAMS343311dThis rant is too generic for me to figure out if its a legit rant or trolling.
Like what are we talking here? Using all query params instead of a post body? or do you just hate all URL params? Including path params?
Hazarth223211dSure It's legal, It's valid HTTPs...
Also the body of a Post is for data. But if you want to specify a resource that's where url params and query params come in...
POST body should for the most part include things that are actually gonna be saved or used for creating a resource.
URL params should specify *which* resource you're using
Query params should further specify the scope of the resource if needed!
I can't think of an actually useful example right now, but you can see the separation of concerns. It's cleaner than posting a body that has to be parsed into several objects and fields just to filtered and processed.
Kinda as if your post envelope had the address and stamp on the inside
I kinda assumed that a post request expecting all params to be in query.
Too used to it. I usually just use jq or other to serialize the form in those cases.
It's slightly annoying with like forms containing personal data, like names or worse.. credit cards..
I usually just shrug and go " I just work here " in those cases.
eo2875165211dIn the WordPress API, you sometimes have to authenticate through the query instead of the headers because the plugins erase the headers. But WordPress sucks and query authentication sucks too.
It's very legal and very cool.
Bad practice IMHO. I can't see a good use case for it personally.
theabbie432711dPOST request is for sensitive or long data, if there is some other kind of data which isn't either of above and is related to request metadata, then, it's good to put it as query parameter.
Yeah about that... Fuck em