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.