What is Hypertext Transfer Protocol HTTP, What is a URL, HTTP header format
Hypertext Transfer Protocol (HTTP) is the protocol that enables the connection between a web server and a client. Hypertext Transfer Protocol (HTTP) is an application layer protocol for distributing information in the World Wide Web (WWW). Hypertext Transfer Protocol (HTTP) is based on the client–server architecture. An Hypertext Transfer Protocol (HTTP) server (commonly called as a web server) uses the well-known port number 80. Examples of Hypertext Transfer Protocol (HTTP) Server or web server are Internet Information Server (IIS), Apache Web Server etc. A Hypertext Transfer Protocol (HTTP) client is also called a web browser (Mozilla FireFox, Internet Explorer, Google chrome etc). Hypertext Transfer Protocol (HTTP) operates on a request-response model. A browser sends a request to a server for a file, and the server responds with the requested file if it is available.
In WWW, information is typically provided as Hypertext Markup Language (HTML) files (called web pages). WWW resources are specified by Uniform Resource Locators (URL). Uniform Resource Locator identifies where a resource is available and the mechanism for retrieving it.
An example for Uniform Resource Locator is https://www.omnisecu.com/tcpip/index.php. The first part of a URL is the protocol part, which is identified by “http://”. When we use any other protocol like File Transfer Protocol (FTP), this part can be replaced by “ftp://”. The protocol pat is followed by a server domain name or server IP address, and path to a resource (an.HTML file or a PHP server side program).
Hypertext Transfer Protocol (HTTP) messages are English-based and flexible. Format of Hypertext Transfer Protocol (HTTP) headers are given below.
A Hypertext Transfer Protocol (HTTP) client request.
GET / HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729)
Accept: text.html,application/.html+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
A Hypertext Transfer Protocol (HTTP) Server Response
HTTP/1.x 200 OK
Cache-Control: private, max-age=0
Date: Sat, 21 Mar 2009 04:09:39 GMT
Expires: -1
Content-Type: text.html; charset=UTF-8
Content-Encoding: gzip
Server: gws
Content-Length: 2671
Since HTTP/1.0, the first line of the HTTP response is called the status line and includes a numeric status code (As in example 200) and the reason in text ("OK").
You have learned what is Hypertext Transfer Protocol (HTTP), use of Hypertext Transfer Protocol (HTTP), what is a URL and Hypertext Transfer Protocol (HTTP) message. Click "Next" to continue.