Repository navigation
HTTP
Wei edited this page Mar 26, 2019
·
1 revision
HTTP stands for Hypertext Transfer Protocol. It's a stateless, application-layer protocol for communicating between distributed systems, and is the foundation of the modern web.
- GET: fetch an existing resource. The URL contains all the necessary information the server needs to locate and return the resource.
- POST: create a new resource. POST requests usually carry a payload that specifies the data for the new resource.
- PUT: update an existing resource. The payload may contain the updated data for the resource.
- DELETE: delete an existing resource.
- HEAD: this is similar to GET, but without the message body. It's used to retrieve the server headers for a particular resource, generally to check if the resource has changed, via timestamps.
- TRACE: used to retrieve the hops that a request takes to round trip from the server. Each intermediate proxy or gateway would inject its IP or DNS name into the Via header field. This can be used for diagnostic purposes.
- OPTIONS: used to retrieve the server capabilities. On the client-side, it can be used to modify the request based on what the server can support.
202 Accepted 204 No Content 205 Reset Content 206 Partial Content
301 Moved Permanently 303 See Other 304 Not Modified
400 Bad Request 401 Unauthorized 403 Forbidden 405 Method Not Allowed 409 Conflict
501 Not Implemented 503 Service Unavailable