Skip to content

Instantly share code, notes, and snippets.

@ARehmanMahi
Created December 14, 2021 05:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ARehmanMahi/444f9ea744b86a97358661cbde0486eb to your computer and use it in GitHub Desktop.
Save ARehmanMahi/444f9ea744b86a97358661cbde0486eb to your computer and use it in GitHub Desktop.
HTTP Response Cheat Sheet for APIs
CRUD (Create, Read, Update, Delete) Generic > 200 OK
Create
> 201 Created
Read
> 200 OK
Update
> 204 No Content
Delete
> 204 No Content
Create Error: DB contraints (Duplicate, Not null etc.)
> 409 Conflict
Record Not Found
> 404 Not Found
Not Logged In
> 401 Unauthorized
No Allowed (Permission error)
> 403 Forbidden
Validation Errors
> 400 Bad Request
Server Error (Unhandeled Exception or Code errors)
> 500 Internal Server Error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment