Overview

What is HTTP

  • HTTP stands for “HyperText Transfer Protocol

  • HTTP is a protocol which allows the fetching of resources, such as HTML documents

  • It is the foundation of any data exchange on the Web and it is a client-server

  • Communication between client computers and web servers is done by sending HTTP Requests and receiving HTTP Responses


Example

inline

  1. A client (a browser) sends an HTTP request to the web

  2. An web server receives the request

  3. The server runs an application to process the request

  4. The server returns an HTTP response (output) to the browser

  5. The client (the browser) receives the response


Exercise: Inspect your Browser’s HTTP Request and Response

We can use our browser’s developer tools to see what an HTTP Request and HTTP Response looks like when our browser visits a webpage:

Try the following:

  1. Open up your browser’s developer tools

  2. Select the “Network” tab

  3. In your browser’s address bar, navigate to https://generalassemb.ly/

  4. In the “Network” tab of your developer tools, you will see a list of files that were received from the web server, inspect the file named: generalassemb.ly

    inline

  5. Inspect the “Headers”, “Preview” & “Response” tabs

    inline