This is an archived version of the course and is no longer updated. Please find the latest version of the course on the main webpage.

Introduction to HTTP

In this module, we will give you a brief overview on how to perform HTTP requests using Python.

This will also serve as a quick introduction to the world of Web programming, which may be useful for you at some point in your degree (and beyond).

We will only cover the very basics of how to send HTTP requests to web servers and process their response. We are only a Python Programming course after all! Web development is a very large topic that would require a course or two to cover.

What is HTTP?

I’m sure you have seen “http://” all the time when you type a URL into your browser. But what exactly is HTTP?

The Hypertext Transfer Protocol (HTTP) is “an application-level protocol for distributed, collaborative, hypermedia information systems” [source]

In simpler terms, it defines how a client (e.g. your browser, a mobile app) should communicate with a server (e.g. Google, Facebook).

At a high-level, the client will send an HTTP request to the server. The server will receive the request and process it, and return an HTTP response to the client. The client receives the response and processes it accordingly.

The client sends a request and the server sends a response