Chapter 4: HTTP Programming

This chapter will introduce you to the HTTP protocol and cover how we can retrieve and manipulate web content using Python. We also take a look at the standard urllib library, as well as requests and httpx packages. In addition, we'll look at the third-party requests module, which is a very popular alternative to urllib. It has an elegant interface and a powerful feature set, and it is a great tool for streamlining HTTP workflows. Finally, we will cover HTTP authentication mechanisms and how we can manage them with the requests module.

This chapter will provide us with the foundation to become familiar with different alternatives within Python when we need to use a module that provides different functionality to make ...

Get Mastering Python for Networking and Security - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.