3 ms·
Successful response? 200 and a JSON payload. Error response? 200 and a human-readable string describing the error.
by pavel_lishin 9y ago
Successful response? 200 and a JSON payload.
Error response? 200 and a human-readable string describing the error.
- bastijn 9y agoYes, the idea is indeed a signal that the request was received and the message the actual response. Problem is, if you are going to send me the actual HTTP status code in the 200 response with no additional information, you might as well send directly. Works better with all the libraries as well. Now we had to write a layer of abstraction to pull the actual message and code an forward that into our applications and third party libs. Personally, I prefer APIs that adhere to the HTTP status codes as defined in the standard.