HTTP Status Codes

1xx (Informational)
These codes indicate that the request was received and is being processed, but there is no final response yet.
- 100 Continue: Indicates that the initial part of a request has been received and the client can continue sending the rest of the request.
2xx (Success)
These codes indicate that the request was successful and the server processed it correctly.
200 OK: The request was successful, and the server returned the requested data.
201 Created: The request was successful, and a new resource was created as a result.
204 No Content: The request was successful, but there is no content to send in the response.
3xx (Redirection)
These codes indicate that the client must take additional actions to complete the request.
301 Moved Permanently: The requested resource has been moved to a new URL permanently.
302 Found: The requested resource has been found at a different URI temporarily.
4xx (Client Error)
These codes indicate that there was an error with the client’s request.
400 Bad Request: The request was invalid or cannot be understood by the server.
401 Unauthorized: Authentication is required for the requested resource.
403 Forbidden: The client does not have permission to access the resource.
404 Not Found: The requested resource could not be found.
5xx (Server Error)
These codes indicate that there was an error on the server side while processing the request.
500 Internal Server Error: The server encountered an error and could not complete the request.
503 Service Unavailable: The server is temporarily unavailable, often due to maintenance or overload.
Summary
HTTP status codes are crucial for conveying the outcome of an API request and facilitate effective communication between clients and servers in RESTful APIs.


