Saturday, April 17, 2010

What is Http? Types of Headers in HTTP

The Hypertext Transfer Protocol (HTTP) is an Application Layer protocol for distributed, collaborative, hypermedia information systems.

HTTP is a request-response standard typical of client-server computing. In HTTP, web browsers or spiders typically act as clients, while an application running on the computer hosting the web site acts as a server. The client, which submits HTTP requests, is also referred to as the user agent. The responding server, which stores or creates resources such as HTML files and images, may be called the origin server. In between the user agent and origin server may be several intermediaries, such as proxies, gateways, and tunnels.

HTTP is not constrained in principle to using TCP/IP, although this is its most popular implementation platform. Indeed HTTP can be "implemented on top of any other protocol on the Internet, or on other networks." HTTP only presumes a reliable transport; any protocol that provides such guarantees can be used.

Resources to be accessed by HTTP are identified using Uniform Resource Identifiers (URIs)—or, more specifically, Uniform Resource Locators (URLs)—using the http or https URI schemes.

Requests Headers:
These are the following request headers:
Accept Content-Types that are acceptable
Accept-Charset Character sets that are acceptable
Accept-Encoding Acceptable encodings
Accept-Language Acceptable languages for response
Cache-Control Used to specify directives that MUST be obeyed by all caching
mechanisms along the request/response chain
Content-Type The mime type of the body of the request (used with POST and PUT
requests)
Host The domain name of the server (for virtual hosting), mandatory since
HTTP/1.1
Pragma Implementation-specific headers that may have various effects
anywhere along the request-response chain.

Responses
These are the response headers

Accept Content-Types that are acceptable
Accept-Charset Character sets that are acceptable
Accept-Encoding Acceptable encodings
Accept-Language Acceptable languages for response
Cache-Control Used to specify directives that MUST be obeyed by all caching
mechanisms along the request/response chain
Content-Type The mime type of the body of the request (used with POST and PUT
requests)
Host The domain name of the server (for virtual hosting), mandatory since
HTTP/1.1
Pragma Implementation-specific headers that may have various effects
anywhere along the request-response chain.
WWW-Authenticate Indicates the authentication scheme that should be used to access
the requested entity.
Set-Cookie an HTTP cookie

0 comments:

Post a Comment