In this chapter, we learned principles of the HTTP . We saw how to perform numerous fundamental tasks with the urllib standard library and the third-party Requests packages.
For each library, we learned about the structure of HTTP messages, HTTP status codes, the different headers that we may encounter in requests and responses, and how to interpret and use them to customize our requests. We also covered how to handle cookies and how to submit data to websites in the manner of submitting a form on a web page, and how to extract the parameters that we need from a page's source code.
In the next chapter, we'll be employing what we've learned here to carry out detailed interactions with different web services, query APIs for data, and upload our own objects to the web.