News for hackers. Stuff that matters.
Re:API Practices If You Hate Your Customers by mleonhard on Thursday December 12, 2019 @07:33AM (#21771288)
The client should try to parse the response body only if it has the appropriate Content-Type header value. It should not assume that responses with various status codes have a particular body format.
Re:API Practices If You Hate Your Customers by jayd16 on Thursday December 12, 2019 @10:18AM (#21772460)
Do you suggest having a content-type header specific to your app? Something like "application/my-app+json"? Will most tooling handle this correctly? In my experience the always 200 api style is a lot more common.