Answer in Web Development for pooja #259120
a) Explain the following with the help of a diagram/example, if needed:
(i) HTTP methods
HTTP is based on the “client-server” technology, that is, it is assumed that:
Consumers (clients) who initiate the connection and send the request;
Providers (servers) that are waiting for a connection to receive a request, take the necessary actions and return a message with the result.
HTTP is now ubiquitous on the World Wide Web to retrieve information from websites. In 2006, in North America, the share of HTTP traffic exceeded the share of P2P networks and amounted to 46%, of which almost half is streaming video and audio .
HTTP is also used as a “transport” for other application-layer protocols such as SOAP, XML-RPC, WebDAV.
The main object of manipulation in HTTP is the resource pointed to by the URI (Uniform Resource Identifier) in the client request. Typically, these resources are files stored on the server, but they can be logical objects or something abstract. A feature of the HTTP protocol is the ability to specify in the request and response the way of representing the same resource by various parameters: format, encoding, language, etc. (in particular, the HTTP header is used for this). It is thanks to the ability to specify how the message is encoded that the client and server can exchange binary data, although this protocol is textual.
HTTP – Application Layer Protocol; similar to it are FTP and SMTP. Messages are exchanged according to the usual “request-response” scheme. HTTP uses global URIs to identify resources. Unlike many other protocols, HTTP is stateless. This means that there is no preservation of an intermediate state between request-response pairs. Components using HTTP can independently store state information associated with recent requests and responses (for example, “cookies” on the client-side, “sessions” on the server-side). The requesting browser can track response delays. The server can store the IP addresses and request headers of the latest clients. However, the protocol itself is not aware of previous requests and responses, it does not provide internal state support, and it does not have such requirements.
When accessing data via FTP or file protocols, the file type (more precisely, the type of data it contains) is determined by the file name extension, which is not always convenient. Before sending the data itself, HTTP passes the “Content-Type: type/subtype” header, which allows the client to unambiguously determine how to process the sent data. This is especially important when working with CGI scripts when the file name extension indicates not the type of data sent to the client, but the need to run this file on the server and send the client the results of the program written in this file (while the same file in depending on the request arguments and its own considerations, it can generate responses of different types – in the simplest case, pictures in different formats).
In addition, HTTP allows the client to send parameters to the server that will be passed to the CGI script being run. For this, forms were introduced in HTML.
These features of HTTP allowed the creation of search engines (the first of which was AltaVista, created by DEC), forums, and Internet shops. This commercialized the Internet, companies emerged whose main field of activity was the provision of Internet access (providers) and the creation of websites.