List of HTTP Status Codes
This is a list of HTTP status code responses. Code examples for are included.
1620 views
Edited: 2021-04-20 09:06
This is a list of HTTP Status Codes. You can use this as a reference when creating responses in your server-sided programming language.
In PHP, status codes can be delivered with the header function.
Success Codes
The below is a table of common HTTP Response Codes.
200 OK | The server returned the resource successfully. |
201 Created | The request has been fulfilled and resulted in a new resource being created. |
202 Accepted | The request has been accepted for processing, but the processing has not been completed. |
203 Non-Authoritative Information | The returned metainformation in the entity-header is not the definitive set as available from the origin server, but is gathered from a local or a third-party copy. |
204 No Content | The server has fulfilled the request but does not need to return an entity-body, and might want to return updated metainformation. |
205 Reset Content | The server has fulfilled the request and the user agent SHOULD reset the document view which caused the request to be sent. |
206 Partial Content | The server has fulfilled the partial GET request for the resource. The request must have included a Range header field. |
304 Not Modified | The resource has not been modified, and no response body is sent. |
Redirection Codes
Here are some of the common redirection codes. Most of these response codes should be sent a long with a location for the new resource, which should be provided in the location header.
301 Moved Permanently | The resource has Permanently moved, and future requests should be made for the given URL. |
302 Found | The resource is temporarily located at a different location, and since this location may change from time to time, the client should continue to use the original URL for future requests. |
303 See Other | The response for the request can be found at a different URL. |
4xx Response Codes
These are some of the common error codes send by servers.
400 Bad Request | The syntax of the request was bad, and the client should not repeat the request without modifications. |
401 Unauthorized | The request requires a user to be logged in, the response must include a WWW-Authenticate header field. |
403 Forbidden | The server understood the request, but is refusing to fulfill it. I.e. The user entered a wrong username or password. |
404 Not Found | The requested resource could not be found. I.e. Nothing can be found here, i have looked absolutely everywhere technically possible, and nothing can be found. |
405 Method Not Allowed | The request method was not allowed (E.g. POST, PUT, GET, DELETE). |
Tell us what you think: