###### Table of Contents - [[#Structure of an HTTP Request]] - [[#Example]] - [[#More info]] ###### Structure of an HTTP Request ^85025d &nbsp; | &nbsp; | &nbsp; ------|----- | ------- **Request Line** | METHOD [uri] HTTP/[version] &nbsp; &nbsp; | GET example.com/xml HTTP/1.1 &nbsp; &nbsp; &nbsp; &nbsp; **Headers** | Header Name : Value<br>(each on its own line) | Host: httbin.org<br>User-Agent: telnet<br>Accept-Language: en-US | Blank Line | | **Request Body** <br> (optional; only for POST<br>requests, not GET requests) | | ###### Example Note: the data sent to the server with POST is stored in the request body of the HTTP request: ```shell POST /test/demo_form.php HTTP/1.1 Host: w3schools.com name1=value1&name2=value2 ``` #### Packets Computers, via the internet, send information in streams of data called packets. There are five basic layers in the structure of every packet: - Application layer - Transport layer - Network layer - Link layer - Physical layer ![[internet_packet.jpg]] The tranpsort layer plus the network layer, together, form what's called the internet protocol suite, or TCP/IP. #### More info [Overview of HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview) [HTTP Request Methods](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) [HTTP Headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) ___ **Tags**: #http