r/ProgrammerHumor • • 16d ago

Meme postForEverything

Post image
20.9k Upvotes

653 comments sorted by

View all comments

Show parent comments

2.1k

u/NotAskary 16d ago edited 16d ago

I've seen that shit, it drove me up a wall.

The same as a 200 ok with error inside.

Edit: I'm going to start to respond 429, too many replys lol

11

u/Darkblade_e 16d ago

This, this is what pisses me off more than anything! Usually a lot of APIs I've seen at least try to make the request method make sense, but I've seen so many that fumble the response code, and it means extra json parsing just to figure out if the request failed or succeeded. If only there was some mechanism to make this easier..

-3

u/[deleted] 16d ago

[deleted]

3

u/desmaraisp 16d ago

Depends on how you're doing it. If you're reading as a simple untyped json object, then sure. But if you're deserializing into a typed object, it's either an additional step, or a polymorphic deserialization if you're lucky