Tutorial by Examples

A HTTP 500 Internal Server Error is a general message meaning that the server encountered something unexpected. Applications (or the overarching web server) should use a 500 when there's an error processing the request - i.e. an exception is thrown, or a condition of the resource prevents the proces...
HTTP 404 Not Found means that the server couldn't find the path using the URI that the client requested. HTTP/1.1 404 Not Found Most often, the requested file was deleted, but sometimes it can be a document root misconfiguration or a lack of permissions (though missing permissions more frequentl...
Use 403 Forbidden when a client has requested a resource that is inaccessible due to existing access controls. For example, if your app has an /admin route that should only be accessible to users with administrative rights, you can use 403 when a normal user requests the page. GET /admin HTTP/1.1 ...
Send an HTTP response with status code 200 to indicate a successful request. The HTTP response status line is then: HTTP/1.1 200 OK The status text OK is only informative. The response body (message payload) should contain a representation of the requested resource. If there is no representation...
Send a 304 Not Modified response status from the server send in response to a client request that contains headers If-Modified-Since and If-None-Match, if the request resource hasn’t changed. For example if a client request for a web page includes the header If-Modified-Since: Fri, 22 Jul 2016 14:3...
2xx Success 200 OK - Standard response for successful HTTP requests. 201 Created - The request has been fulfilled, resulting in the creation of a new resource. 204 No Content - The server successfully processed the request and is not returning any content. 3xx Redirection 304 Not Modified...

Page 1 of 1