{"id":2155,"date":"2016-10-26T11:51:10","date_gmt":"2016-10-26T06:21:10","guid":{"rendered":"https:\/\/www.innovationm.com\/blog\/?p=2155"},"modified":"2023-01-20T18:55:58","modified_gmt":"2023-01-20T13:25:58","slug":"http-protocol","status":"publish","type":"post","link":"https:\/\/www.innovationm.com\/blog\/http-protocol\/","title":{"rendered":"HTTP Protocol"},"content":{"rendered":"<h3>Introduction<\/h3>\n<p>Before we dive into understanding about HTTP, let\u2019s try to understand meaning of the word \u201cProtocol\u201d.<\/p>\n<p>A Protocol is a set of rules that we use for specific purposes. In the current scenario, when we are talking about\u00a0<em>protocols,\u00a0<\/em>it is about communication- the way we talk to each other. For instance, we speak in English and because you understand English, you can understand. Here English is the protocol. The moment we start speaking in a language that you don\u2019t understand; the protocol beats its purpose. Thus, we need both the parties to agree to a set of rules for the communication to take place.<\/p>\n<p><strong>Now, talking about the web, multiple protocols are used to communicate. <\/strong>Primarily for end users the most important and visible protocols are HTTP and HTTPS. Though\u00a0there are many other protocols as well, but HTTP and HTTPS protocols cater to most of the population.<\/p>\n<h3>Now, what does HTTP mean?<\/h3>\n<p>HTTP is hypertext transfer protocol. As we all know, computers work in a language of 1\u2019s and 0\u2019s i.e. Binary language.<\/p>\n<p>Let\u2019s say I want to write \u2018a\u2019. Now, if 0 stands for \u2018a\u2019, 1 stands for \u2018b\u2019, and 01 stands for \u2018c\u2019, I can infer that a combination of 0\u2019s and 1\u2019s can construct a word as well. In this case, the text is already constructed and is being sent on the wire. Here, what is being transferred is text (in form of bytes). I am emphasising on \u2018text\u2019 because this text is interpreted by the browser and the moment browser interprets it, it becomes hypertext, and the protocol that transfers the text is referred to as <em>hypertext transfer protocol \u2013 HTTP.<\/em><\/p>\n<p>NOTE: Hyper is also a prefix, from the Greek\u00a0<em>hyper-<\/em>\u00a0meaning over, above, or excessive, used in such terms as\u00a0hypertext\u00a0(text that extends to point to or include other text).<\/p>\n<h3>HTTP Overview<\/h3>\n<p>Basically, HTTP is a TCP\/IP based communication protocol, that is used to deliver data (HTML files, image files, query results, etc.) on the World Wide Web. This is an Application Layer protocol. The default port is TCP 80, but other ports can be used as well. It provides a standardized way for computers to communicate with each other. HTTP specification specifies how clients&#8217; request data will be constructed and sent to the server, and how the servers respond to these requests.<\/p>\n<h4>Basic Features<\/h4>\n<p>There are three basic features that make HTTP a simple but powerful protocol:<\/p>\n<ul>\n<li><strong>HTTP is connectionless*:<\/strong>The HTTP client, i.e., a browser initiates an HTTP request and after a request is made, the client disconnects from the server and waits for a response.<\/li>\n<li><strong>HTTP is media independent:<\/strong>It means, any type of data can be sent by HTTP if both the client and the server know how to handle the data content. It is required for the client as well as the server to specify the content type using appropriate MIME-type.<\/li>\n<li><strong>HTTP is stateless:<\/strong>As mentioned above, HTTP is connectionless and it is a direct result of HTTP being a stateless protocol. The server and client are aware of each other only during a current request. Afterwards, both forget about each other. Due to this nature of the protocol, neither the client nor the browser can retain information between different requests across the web pages.<\/li>\n<\/ul>\n<p>* HTTP\/1.0 uses a new connection for each request\/response exchange, where as<br \/>\nHTTP\/1.1 connection may be used for one or more request\/response exchanges.<\/p>\n<h4>HTTP Version<\/h4>\n<p>HTTP uses a\u00a0<strong>&lt;major&gt;.&lt;minor&gt;<\/strong>\u00a0numbering scheme to indicate versions of the protocol.<\/p>\n<p>Here is the general syntax of specifying HTTP version number:<br \/>\n<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h1.png\"><img decoding=\"async\" class=\"alignleft size-full wp-image-2188\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h1.png\" alt=\"h1\" width=\"625\" height=\"36\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h1.png 625w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h1-300x17.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h1-624x36.png 624w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>Example<br \/>\n<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h11.png\"><img decoding=\"async\" class=\"alignleft size-full wp-image-2189\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h11.png\" alt=\"h1\" width=\"625\" height=\"35\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h11.png 625w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h11-300x17.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h11-624x35.png 624w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>HTTPS<\/h3>\n<h4>Why we need HTTPS?<\/h4>\n<p>When you log into your site, your login credentials are easy to intercept if not encrypted with HTTPS. The &#8220;password&#8221; field may show only circles in your Web browser, but\u00a0your actual password is transmitted &#8220;in the clear&#8221; across the Internet for anyone to see. So, sending data on internet over HTTP is like sending item from courier without security. Criminals can access that traffic in several ways, including monitoring WiFi connections, having an inside position at an Internet service provider or backbone network, or by hacking into routers across the Internet so they can watch the traffic that flows across them.<\/p>\n<p>So, new protocol introduced to handle valuable sensitive data. This protocol is known as SSL (Secured Socket Layer).<\/p>\n<p>HTTPS= HTTP + SSL (HTTP protocol working in tandem with SSL)<\/p>\n<p>So, what is SSL? Before we understand SSL, first we need to understand Cryptography.<\/p>\n<h4>What is Cryptography?<\/h4>\n<p>It is basically a science of hiding information. It\u2019s a method of storing and transmitting data in a form so that only those for whom it is intended can read and process it.<\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h12.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignleft size-full wp-image-2190\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h12.png\" alt=\"h1\" width=\"430\" height=\"190\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h12.png 430w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h12-300x133.png 300w\" sizes=\"(max-width: 430px) 100vw, 430px\" \/><\/a><\/p>\n<p>&nbsp;<br \/>\nFig 4.2<\/p>\n<p>In fig 4.2, we have a text \u201cHello World\u201d that is being encrypted by algorithm and the output text after the encryption is called cipher\/encrypted text as sown in above diagram.<\/p>\n<p>Sometimes encryption needs a key to encrypt data. Data encrypted via key can be send to respective consumer who can decrypt to its normal form via same kay, here it is called semantic\u00a0key that is used for both encryption and decryptions.<\/p>\n<p>So, one key can be shared among all the users but this is situation like all the houses have lock and each have key and any one can open any\u2019s lock. So, cryptography come to rescue again. In cryptography, there is a way to encrypt with one key and decrypt with another key.<\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h13.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2191\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h13.png\" alt=\"h1\" width=\"443\" height=\"125\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h13.png 443w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h13-300x85.png 300w\" sizes=\"(max-width: 443px) 100vw, 443px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4>Communication between browser and server<\/h4>\n<p>Coming back around SSL Protocol, so following steps happens when a data is send to serve.<\/p>\n<ol>\n<li>When we type URL with HTTPS then bowser connect over TCP port<br \/>\n443 (default port for HTTPS) over transport layer.<\/li>\n<li>After the connection is successful the next, SSL handshake starts.<\/li>\n<li>Server response with \u201c<strong>server HELLO message<\/strong>\u201d.<\/li>\n<li>Server send digital certificate signed by signing authority (Verisign etc.)<\/li>\n<li>Then server sends \u201c<strong>server HELLO done<\/strong>\u201d message hinting browser to start processing at its end.<\/li>\n<li>Browser response to the server by sending \u201c<strong>Certificate verify<\/strong>\u201d message. Its means server is verified.<\/li>\n<li>Then client sends \u201c<strong>Changed cipher specification<\/strong>\u201d. It means the data send over HTTPS by browser will be encrypted.<\/li>\n<li>After that browser sends the \u201c<strong>Finish Message<\/strong>\u201d which have digest message that contains all the communication held till now.<\/li>\n<li>Now server sends \u201c<strong>Change cipher specification<\/strong>\u201d message.<\/li>\n<li>Again, server sends \u201c<strong>Finish message<\/strong>\u201d which also contains all the information of the communication held till now.<\/li>\n<\/ol>\n<p>The purpose of Finish message is, confirmation that all the previous message not conferred \/ tempered. At this point SSL handshake is complete. The client sends Semantic secret key to server for encryption and decryption.<\/p>\n<p>So, after that actual message shared by browser to the server and this way our data is secured via HTTPS over internet.<\/p>\n<h3>Message Format<\/h3>\n<p>HTTP requests and HTTP responses use a generic message format of RFC 822 for transferring the required data. This generic message format consists of the following four items.<\/p>\n<ul>\n<li>A Start-line<\/li>\n<li>Zero or more header fields followed by CRLF<\/li>\n<li>An empty line (i.e., a line with nothing preceding the CRLF)<\/li>\n<li>indicating the end of the header fields<\/li>\n<li>Optionally a message-body<\/li>\n<\/ul>\n<h4>\u00a0Message Start-Line<\/h4>\n<p>A start-line will have the following generic syntax:<br \/>\n<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h14.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2192\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h14.png\" alt=\"h1\" width=\"578\" height=\"33\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h14.png 578w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h14-300x17.png 300w\" sizes=\"(max-width: 578px) 100vw, 578px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>We will discuss Request-Line and Status-Line while discussing HTTP Request and HTTP Response messages respectively. For now, let&#8217;s see the examples of start line in case of request and response:<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h15.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2193\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h15.png\" alt=\"h1\" width=\"578\" height=\"63\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h15.png 578w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h15-300x33.png 300w\" sizes=\"(max-width: 578px) 100vw, 578px\" \/><\/a><\/p>\n<h4><\/h4>\n<h4>Header Fields<\/h4>\n<p>HTTP header fields provide required information about the request or response, or about the object sent in the message body.<\/p>\n<p>Syntax of the header field is as follow<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h16.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2194\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h16.png\" alt=\"h1\" width=\"549\" height=\"35\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h16.png 549w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h16-300x19.png 300w\" sizes=\"(max-width: 549px) 100vw, 549px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h4>HTTP Request message<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h17.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2195\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h17.png\" alt=\"h1\" width=\"700\" height=\"214\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h17.png 700w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h17-300x92.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h17-624x191.png 624w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><\/h4>\n<p>The above image is explaining all the components of the request. Following is separate example of GET and POST.<\/p>\n<h4>GET Request example<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h19.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2197\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h19.png\" alt=\"h1\" width=\"625\" height=\"103\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h19.png 625w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h19-300x49.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h19-624x103.png 624w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/a><\/h4>\n<p>Here we are not sending any request data to the server because we are fetching a plain HTML page from the server. Connection is a general-header, and the rest of the headers are request headers.<\/p>\n<p>The following example shows how to send form data to the server using request message body:<\/p>\n<h4>Post Request example<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h110.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2198\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h110.png\" alt=\"h1\" width=\"626\" height=\"160\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h110.png 626w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h110-300x77.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h110-624x159.png 624w\" sizes=\"(max-width: 626px) 100vw, 626px\" \/><\/a><\/h4>\n<p>Here the given URL\u00a0<em>\/cgi-bin\/process.cgi<\/em>\u00a0will be used to process the passed data and accordingly, a response will be returned. Here\u00a0<strong>content-type<\/strong>\u00a0tells the server that the passed data is a simple web form data and\u00a0<strong>length<\/strong>\u00a0will be the actual length of the data put in the message body.<\/p>\n<p>After receiving and interpreting a request message, a server responds with an HTTP response message:<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h111.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2200\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h111.png\" alt=\"h1\" width=\"596\" height=\"239\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h111.png 596w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h111-300x120.png 300w\" sizes=\"(max-width: 596px) 100vw, 596px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h112.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2201\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h112.png\" alt=\"h1\" width=\"612\" height=\"313\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h112.png 612w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h112-300x153.png 300w\" sizes=\"(max-width: 612px) 100vw, 612px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h113.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2202\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h113.png\" alt=\"h1\" width=\"663\" height=\"189\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h113.png 663w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h113-300x86.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h113-624x178.png 624w\" sizes=\"(max-width: 663px) 100vw, 663px\" \/><\/a>The following example shows an HTTP response message displaying error condition when the web server could not find the requested page:<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h114.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2203\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h114.png\" alt=\"h1\" width=\"614\" height=\"250\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h114.png 614w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h114-300x122.png 300w\" sizes=\"(max-width: 614px) 100vw, 614px\" \/><\/a><\/p>\n<p>Following is an example of HTTP response message showing error condition when the web server encountered a wrong HTTP version in the given HTTP request:<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h115.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2204\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h115.png\" alt=\"h1\" width=\"612\" height=\"309\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h115.png 612w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h115-300x151.png 300w\" sizes=\"(max-width: 612px) 100vw, 612px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h116.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2205\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h116.png\" alt=\"h1\" width=\"517\" height=\"339\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h116.png 517w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h116-300x197.png 300w\" sizes=\"(max-width: 517px) 100vw, 517px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>HTTP status codes are extensible and HTTP applications are not required to understand the meaning of all registered status codes. A list of all the status codes has been given in a status code topic defined down the line of document<\/p>\n<h3>HTTP \u2013 Methods<\/h3>\n<p>The set of common methods for HTTP\/1.1 is defined below and this set can be expanded based on requirements. These method names are case sensitive and they must be used in uppercase.<\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h117.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-2214 size-full\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h117.png\" alt=\"h1\" width=\"618\" height=\"394\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h117.png 618w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h117-300x191.png 300w\" sizes=\"(max-width: 618px) 100vw, 618px\" \/><\/a><\/p>\n<h3>GET Method<\/h3>\n<p>A GET request retrieves data from a web server by specifying parameters in the URL portion of the request. This is the main method used for document retrieval. The following example makes use of GET method to fetch hello.htm:<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h118.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2215\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h118.png\" alt=\"h1\" width=\"615\" height=\"97\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h118.png 615w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h118-300x47.png 300w\" sizes=\"(max-width: 615px) 100vw, 615px\" \/><\/a><\/p>\n<p>The server response against the above GET request will be as follows:<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h119.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2216\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h119.png\" alt=\"h1\" width=\"614\" height=\"235\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h119.png 614w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h119-300x115.png 300w\" sizes=\"(max-width: 614px) 100vw, 614px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>POST Method<\/h3>\n<p>The POST method is used when you want to send some data to the server, for example, file update, form data, etc. The following example makes use of POST method to send a form data to the server, which will be processed by a process.cgi and finally a response will be returned:<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h120.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2217\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h120.png\" alt=\"h1\" width=\"615\" height=\"160\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h120.png 615w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h120-300x78.png 300w\" sizes=\"(max-width: 615px) 100vw, 615px\" \/><\/a><\/p>\n<p>The server side script process.cgi processes the passed data and sends the following response:<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h121.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2218\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h121.png\" alt=\"h1\" width=\"614\" height=\"235\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h121.png 614w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h121-300x115.png 300w\" sizes=\"(max-width: 614px) 100vw, 614px\" \/><\/a><\/p>\n<h3>HTTP &#8211; Status Codes<\/h3>\n<p>As I described above status code in brief, now we are going to see all the codes with its description. Status code play role in response and the browser or user behaves according to the status code received from the server.<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h122.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2219\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h122.png\" alt=\"h1\" width=\"516\" height=\"339\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h122.png 516w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h122-300x197.png 300w\" sizes=\"(max-width: 516px) 100vw, 516px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>1XX Information:<\/strong><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h123.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2220\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h123.png\" alt=\"h1\" width=\"687\" height=\"169\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h123.png 687w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h123-300x74.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h123-624x154.png 624w\" sizes=\"(max-width: 687px) 100vw, 687px\" \/><\/a><\/p>\n<p><strong>2XX Information:<\/strong><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h124.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2221\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h124.png\" alt=\"h1\" width=\"527\" height=\"478\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h124.png 527w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h124-300x272.png 300w\" sizes=\"(max-width: 527px) 100vw, 527px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>3XX Information:<\/strong><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h125.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2222\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h125.png\" alt=\"h1\" width=\"474\" height=\"511\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h125.png 474w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h125-278x300.png 278w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4XX Information:<\/strong><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h134.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2235\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h134.png\" alt=\"h1\" width=\"528\" height=\"480\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h134.png 528w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h134-300x273.png 300w\" sizes=\"(max-width: 528px) 100vw, 528px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h135.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2236\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h135.png\" alt=\"h1\" width=\"531\" height=\"518\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h135.png 531w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h135-300x293.png 300w\" sizes=\"(max-width: 531px) 100vw, 531px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h136.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2237\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h136.png\" alt=\"h1\" width=\"526\" height=\"278\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h136.png 526w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h136-300x159.png 300w\" sizes=\"(max-width: 526px) 100vw, 526px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5XX Information<\/strong><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h126.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2223\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h126.png\" alt=\"h1\" width=\"472\" height=\"330\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h126.png 472w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h126-300x210.png 300w\" sizes=\"(max-width: 472px) 100vw, 472px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3>Redirection<\/h3>\n<p>HTTP allows servers to redirect a client request to a different location. Although, this will usually result in another network round trip, it has some useful applications:<\/p>\n<ul>\n<li>A web application may use redirection to navigate between parts of the application.<\/li>\n<li>If content has moved to a different URL or domain name, redirection can be used to avoid breaking old URLs or bookmarks.<\/li>\n<li>It is possible to convert a POST request to a GET request using redirection.<\/li>\n<li>A client can be directed to use its local cache for content that has not changed.<\/li>\n<li>A server specifies redirection by returning a <strong>3xx<\/strong> status code:<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h127.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2224\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h127.png\" alt=\"h1\" width=\"500\" height=\"174\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h127.png 500w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h127-300x104.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>How redirection happens actually that I show in pictorial form as below:<\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h128.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2225\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h128.png\" alt=\"h1\" width=\"731\" height=\"388\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h128.png 731w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h128-300x159.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h128-624x331.png 624w\" sizes=\"(max-width: 731px) 100vw, 731px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>The above picture shows, how redirection happens on behalf of status code. All of these status codes require the URL of the redirect target to be given in the Location: header of the HTTP response.<\/p>\n<p>All of these status codes require the URL of the redirect target to be given in the Location: header of the HTTP response.<\/p>\n<h4>Example HTTP response for a 301 redirect<\/h4>\n<p>A <a href=\"https:\/\/en.wikipedia.org\/wiki\/HTTP\">HTTP<\/a> response with the 301 &#8220;moved permanently&#8221; redirect looks like this:<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h129.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2226\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h129.png\" alt=\"h1\" width=\"491\" height=\"203\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h129.png 491w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h129-300x124.png 300w\" sizes=\"(max-width: 491px) 100vw, 491px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<h3><strong>Cross Domain<\/strong><\/h3>\n<p>To understand what is cross domain, let\u2019s understand Ajax request. Suppose you need to populate states on the selection of country and you don\u2019t want to reload the page again for each request. So what we do is we send a silent request (i.e. Ajax request) from back ground and get the particular contain and using the help of JavaScript and reloads the only the stat\u2019s dropdown. SO it get loaded and page doesn\u2019t get refreshed. So suppose A.com want to read data from B.com and both are different servers. Pulling data form another domain is called cross domain.<\/p>\n<p>Following are the pictorial representation of the cross domain request. The following will show what all the steps happens when we send the request cross domain.<\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h130.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2227\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h130.png\" alt=\"h1\" width=\"600\" height=\"443\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h130.png 600w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h130-300x222.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Preflight \/ Preflight requests<\/strong><\/p>\n<ul>\n<li>Unlike simple requests\u00a0(discussed above), &#8220;preflighted&#8221; requests first send an HTTP request by the\u00a0OPTIONS\u00a0method to the resource on the other domain, in order to determine whether the actual request is safe to send.\u00a0 Cross-site requests are preflighted like this since they may have implications to user data.\u00a0 In particular, a request is preflighted if:<\/li>\n<li>It uses methods\u00a0<strong>other<\/strong>than\u00a0GET, HEAD\u00a0or\u00a0POST.\u00a0 Also, if\u00a0POST\u00a0is used to send request data with a Content-Type\u00a0<strong>other<\/strong>\u00a0than\u00a0application\/x-www-form-urlencoded,multipart\/form-data, or\u00a0text\/plain, e.g. if the\u00a0POST\u00a0request sends an XML payload to the server using\u00a0application\/xml\u00a0or\u00a0text\/xml, then the request\u00a0is preflighted.<strong>\u00a0<\/strong><\/li>\n<\/ul>\n<p><strong>An example:<\/strong><\/p>\n<p>When performing certain types of cross-domain AJAX requests, modern browsers that support CORS will insert an extra &#8220;preflight&#8221; request to determine whether they have permission to perform the action.<\/p>\n<h4>Preflight Request:<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h131.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2228\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h131.png\" alt=\"h1\" width=\"582\" height=\"189\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h131.png 582w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h131-300x97.png 300w\" sizes=\"(max-width: 582px) 100vw, 582px\" \/><\/a><\/h4>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4>Preflight Response:<\/h4>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h132.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-2229\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h132.png\" alt=\"h1\" width=\"395\" height=\"124\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h132.png 395w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/h132-300x94.png 300w\" sizes=\"(max-width: 395px) 100vw, 395px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>In the above request and response the \u201cAccess-Control-Request-Method\u201d sends the requested method and in response server sends Allowed methods, which are accepted by servers.<\/p>\n<h3><strong>Multipart Request<\/strong><\/h3>\n<h4><strong><em>What is multipart?<\/em><\/strong><\/h4>\n<p>A HTTP multipart request is a HTTP request that HTTP clients construct to send files and data over to a HTTP Server. It is commonly used by browsers and HTTP clients to upload files to the server.<\/p>\n<p>Thus, a typical multipart Content-Type header field might look like this:<\/p>\n<p>Content-Type: multipart\/mixed;<\/p>\n<p>boundary=gc0p4Jq0M2Yt08jU534c0p<\/p>\n<p>This indicates that the entity consists of several parts, each itself with a structure that is syntactically identical to an RFC 822 message, except that the header area might be completely empty, and that the parts are each preceded by the line<\/p>\n<p>&#8211;gc0p4Jq0M2Yt08jU534c0p<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;title&gt;File Upload&lt;\/title&gt;<br \/>\n&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=UTF-8&#8243;&gt; &lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;form method=&#8221;POST&#8221; action=&#8221;upload&#8221; enctype=&#8221;multipart\/form-data&#8221; &gt;<br \/>\nFile: &lt;input type=&#8221;file&#8221; name=&#8221;file&#8221; id=&#8221;file&#8221; \/&gt;<br \/>\n&lt;br\/&gt;<br \/>\nDestination: &lt;input type=&#8221;text&#8221; value=&#8221;\/tmp&#8221; name=&#8221;destination&#8221;\/&gt;<br \/>\n&lt;\/br&gt;<br \/>\n&lt;input type=&#8221;submit&#8221; value=&#8221;Upload&#8221; name=&#8221;upload&#8221; id=&#8221;upload&#8221; \/&gt;<br \/>\n&lt;\/form&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n<strong>\u00a0<\/strong><\/p>\n<p>This is what submitted data from the fileupload form looks like, after selecting sample.txt as the file that will be uploaded to the tmp directory on the local file system:<\/p>\n<p>POST \/fileupload\/upload HTTP\/1.1<\/p>\n<p>Host: localhost:8080<\/p>\n<p>Content-Type: multipart\/form-data;<\/p>\n<p>boundary=&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;263081694432439<\/p>\n<p>Content-Length: 441<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;263081694432439<\/p>\n<p>Content-Disposition: form-data; name=&#8221;file&#8221;; filename=&#8221;sample.txt&#8221;<\/p>\n<p>Content-Type: text\/plain<\/p>\n<p>Data from sample file<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;263081694432439<\/p>\n<p>Content-Disposition: form-data; name=&#8221;destination&#8221;<\/p>\n<p>\/tmp<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;263081694432439<\/p>\n<p>Content-Disposition: form-data; name=&#8221;upload&#8221;<\/p>\n<p>Upload<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;263081694432439&#8211;<\/p>\n<p>&nbsp;<\/p>\n<p>Therefore it is clear that:<\/p>\n<ul>\n<li>Content-Type: multipart\/form-data; boundary=&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;9051914041544843365972754266\u00a0sets the content type to\u00a0multipart\/form-data\u00a0and says that the fields are separated by the given\u00a0boundary\u00a0string.<\/li>\n<li>every field gets some sub headers before its data:<br \/>\nContent-Disposition: form-data;,<\/li>\n<li>the field\u00a0name, the\u00a0filename, followed by the data.<\/li>\n<li>The server reads the data until the next boundary string. The browser must choose a boundary that will not appear in any of the fields, so this is why the boundary may vary between requests.<\/li>\n<li>Because we have the unique boundary, no encoding of the data is necessary: binary data is sent as is.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Before we dive into understanding about HTTP, let\u2019s try to understand meaning of the word \u201cProtocol\u201d. A Protocol is a set of rules that we use for specific purposes. In the current scenario, when we are talking about\u00a0protocols,\u00a0it is about communication- the way we talk to each other. For instance, we speak in English [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2232,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71],"tags":[],"class_list":["post-2155","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mobile"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HTTP Protocol | InnovationM Blog<\/title>\n<meta name=\"description\" content=\"The blog highlights the simple yet powerful HTTP Protocol used for communication between the client and the server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.innovationm.com\/blog\/http-protocol\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTTP Protocol | InnovationM Blog\" \/>\n<meta property=\"og:description\" content=\"The blog highlights the simple yet powerful HTTP Protocol used for communication between the client and the server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.innovationm.com\/blog\/http-protocol\/\" \/>\n<meta property=\"og:site_name\" content=\"InnovationM - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-26T06:21:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-20T13:25:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/HTTP-Protocol.png\" \/>\n\t<meta property=\"og:image:width\" content=\"639\" \/>\n\t<meta property=\"og:image:height\" content=\"254\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"InnovationM Admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InnovationM Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/http-protocol\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/http-protocol\\\/\"},\"author\":{\"name\":\"InnovationM Admin\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"headline\":\"HTTP Protocol\",\"datePublished\":\"2016-10-26T06:21:10+00:00\",\"dateModified\":\"2023-01-20T13:25:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/http-protocol\\\/\"},\"wordCount\":2688,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/http-protocol\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/10\\\/HTTP-Protocol.png\",\"articleSection\":[\"Mobile\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/http-protocol\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/http-protocol\\\/\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/http-protocol\\\/\",\"name\":\"HTTP Protocol | InnovationM Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/http-protocol\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/http-protocol\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/10\\\/HTTP-Protocol.png\",\"datePublished\":\"2016-10-26T06:21:10+00:00\",\"dateModified\":\"2023-01-20T13:25:58+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"description\":\"The blog highlights the simple yet powerful HTTP Protocol used for communication between the client and the server.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/http-protocol\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/http-protocol\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/http-protocol\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/10\\\/HTTP-Protocol.png\",\"contentUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/10\\\/HTTP-Protocol.png\",\"width\":639,\"height\":254},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/http-protocol\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTTP Protocol\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\",\"name\":\"InnovationM - Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\",\"name\":\"InnovationM Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"caption\":\"InnovationM Admin\"},\"sameAs\":[\"http:\\\/\\\/www.innovationm.com\\\/\"],\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/author\\\/innovationmadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HTTP Protocol | InnovationM Blog","description":"The blog highlights the simple yet powerful HTTP Protocol used for communication between the client and the server.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.innovationm.com\/blog\/http-protocol\/","og_locale":"en_US","og_type":"article","og_title":"HTTP Protocol | InnovationM Blog","og_description":"The blog highlights the simple yet powerful HTTP Protocol used for communication between the client and the server.","og_url":"https:\/\/www.innovationm.com\/blog\/http-protocol\/","og_site_name":"InnovationM - Blog","article_published_time":"2016-10-26T06:21:10+00:00","article_modified_time":"2023-01-20T13:25:58+00:00","og_image":[{"width":639,"height":254,"url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/HTTP-Protocol.png","type":"image\/png"}],"author":"InnovationM Admin","twitter_misc":{"Written by":"InnovationM Admin","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.innovationm.com\/blog\/http-protocol\/#article","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/http-protocol\/"},"author":{"name":"InnovationM Admin","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"headline":"HTTP Protocol","datePublished":"2016-10-26T06:21:10+00:00","dateModified":"2023-01-20T13:25:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/http-protocol\/"},"wordCount":2688,"commentCount":0,"image":{"@id":"https:\/\/www.innovationm.com\/blog\/http-protocol\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/HTTP-Protocol.png","articleSection":["Mobile"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.innovationm.com\/blog\/http-protocol\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.innovationm.com\/blog\/http-protocol\/","url":"https:\/\/www.innovationm.com\/blog\/http-protocol\/","name":"HTTP Protocol | InnovationM Blog","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/http-protocol\/#primaryimage"},"image":{"@id":"https:\/\/www.innovationm.com\/blog\/http-protocol\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/HTTP-Protocol.png","datePublished":"2016-10-26T06:21:10+00:00","dateModified":"2023-01-20T13:25:58+00:00","author":{"@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"description":"The blog highlights the simple yet powerful HTTP Protocol used for communication between the client and the server.","breadcrumb":{"@id":"https:\/\/www.innovationm.com\/blog\/http-protocol\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.innovationm.com\/blog\/http-protocol\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.innovationm.com\/blog\/http-protocol\/#primaryimage","url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/HTTP-Protocol.png","contentUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2016\/10\/HTTP-Protocol.png","width":639,"height":254},{"@type":"BreadcrumbList","@id":"https:\/\/www.innovationm.com\/blog\/http-protocol\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.innovationm.com\/blog\/"},{"@type":"ListItem","position":2,"name":"HTTP Protocol"}]},{"@type":"WebSite","@id":"https:\/\/www.innovationm.com\/blog\/#website","url":"https:\/\/www.innovationm.com\/blog\/","name":"InnovationM - Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.innovationm.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed","name":"InnovationM Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","caption":"InnovationM Admin"},"sameAs":["http:\/\/www.innovationm.com\/"],"url":"https:\/\/www.innovationm.com\/blog\/author\/innovationmadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/2155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/comments?post=2155"}],"version-history":[{"count":0,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/2155\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media\/2232"}],"wp:attachment":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media?parent=2155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/categories?post=2155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/tags?post=2155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}