HTTP
HTTP (the Hypertext Transfer Protocol) is the network protocol on which the World Wide Web is based. Its original purpose was the transfer of HTML pages, but it is being used for transferring any type of document. It supports rich meta-information and has a robust caching system.
History
HTTP was created at CERN by Tim Berners-Lee in the 1980s as a way to share hypertext documents. After 1990, the protocol began to be used by other sites, primarily in the scientific world. Notable developments were the Mosaic web browser and the NCSA HTTPd web server, both developed at the National Center for Supercomputing Applications.
Technical details
The HTTP protocol follows a client-server model, where the client issues a request for a resource to the server. Requests and responses consist of several headers and, optionally, a body. Resources are identified using a URI (Uniform Resource Identifier).
Request methods
Clients can use one of eight request methods:
- HEAD
- GET
- POST
- PUT
- DELETE
- TRACE
- OPTIONS
- CONNECT
Typically, only GET and POST methods are used in web applications, although protocols like WebDAV make use of others.
Status codes
Server responses include a status header, which informs the client whether the request succeeded. The status header is made up of a "status code" and a "reason phrase" (descriptive text). Status codes are grouped into classes: 1xx (informational), 2xx (success), 3xx (redirect), 4xx (client error), 5xx (server error). For example, if the client requests a non-existent document, the status code will be "404 Not Found".
External links
- RFC2616 - the formal specification of HTTP/1.1