HTTP status codes

Hello everybody,

today I want to write a few words about http status codes which some kind are common among developers for web api clients.

So,

For POST request following are common to return: 201 ( item was created ), 400 ( bad request ), 500 ( internal server error )

For GET: 200 ( ok ), 404 ( not found ), 400, 500.

For DELETE: 200 ( delete was successful ), 404 ( not found ), 400, 500

PUT: 200, 404, 400, 500

PATCH: 200, 404, 400, 500.

Also ther are general codes:

401 - not authorized,

403 - forbidden

405 - method not allowed.

No Comments

Add a Comment