hypertext
HTTP operates within the IPT Application Level and within layer 6 of the OSI model. It is the primary protocol used by web browsers to communicate and retrieve web pages from web servers. It is used where the browser is the client and the web server is the server. There are 3 primary HTTP commands used by browsers- GET, HEAD and POST.
GET, HEAD, POST
![Picture](/uploads/6/5/7/7/65776519/8369047.jpeg?250)
- The HTTP GET method retrieves entire documents- the documents retrieved could be HTML files, image files, video files or any other type of files.
- The browser requests a document from a particular web server using a GET command together with the URL of the document.
- The web server responds by transmitting the document to the browser.
- The header, which precedes the file data, indicates the nature of the data in the file- reads the header data to determine how it should display the data in the file that follows.
- For example; if it is an HTML file then the browser will interpret and display the file based on its HTML tags.
- HTTP HEAD method retrieves just the header information for the file, commonly used to check if the file has been updated since the browser last retrieved the file.
- If the file has not been updated then there is no need to retrieve the entire file, rather the existing version held in browser’s cache can be displayed.
- The HTTP POST method is used to send data from the browser to a web server, commonly used to send all the data input by users within web-based forms.
- For example many web sites require users to create an account. The user's details are sent back to the web server using the HTTP POST method.