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
-
@ThatDannyBoy not much to say really.
I'm writing a wrapper for an external API that doesn't make use of HTTP status codes and always sets the status to 200 for different responses for the same API.
I like to rely on status codes in my wrapper design to determine whether or not the request is successful and to return an error to the user in case an error occurs. -
devTea240885y@rantsauce must be my company web services, let me complain and screech to them again
-
C0D4681385yStandards are not laws.
Plus almost every Api I've ever connected to runs everything back with 200 and the error in the response message. -
It can make sense to ignore HTTP status codes.
For example, if you define your own custom protocol having its own status/return codes, HTTP becomes no more than a transport layer, replacable with multiple other protocols, some of them not having status codes at all.
You CAN then translate your status codes to HTTP (if that's possible), but why should you do this extra work and build redundancies if you simply could check the protocol's status code at the first place?
Related Rants
Argh! What are HTTP status codes for if you're not using them in your API implementation?!
Fucking morons!
rant
web-api
http-status-codes-are-fucking-important
http
api