HTML Verbs and Return Codes
In web development, HTML verbs (also known as HTTP methods) and return codes (HTTP
status codes) play crucial roles in client-server communication. Understanding these
concepts is essential for building robust and efficient web applications. This document
discusses the different HTML verbs and return codes.
HTML Verbs
GET
The GET method requests a representation of the specified resource. Requests using GET
should only retrieve data.
POST
The POST method is used to submit an entity to the specified resource, often causing a
change in state or side effects on the server.
PUT
The PUT method replaces all current representations of the target resource with the
request payload.
DELETE
The DELETE method deletes the specified resource.
PATCH
The PATCH method is used to apply partial modifications to a resource.
HEAD
The HEAD method asks for a response identical to that of a GET request, but without the
response body.
OPTIONS
The OPTIONS method is used to describe the communication options for the target
resource.
HTTP Status Codes
Informational responses (100–199)
These status codes indicate that the request was received, and the process is continuing.
100 Continue
101 Switching Protocols
Successful responses (200–299)
These status codes indicate that the request was successfully received, understood, and
accepted.
200 OK
201 Created
204 No Content
Redirection messages (300–399)
These status codes indicate that further action needs to be taken by the user agent to fulfill
the request.
301 Moved Permanently
302 Found
304 Not Modified
Client error responses (400–499)
These status codes indicate that the client seems to have made an error.
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
Server error responses (500–599)
These status codes indicate that the server failed to fulfill an apparently valid request.
500 Internal Server Error
502 Bad Gateway
503 Service Unavailable