HTTP Requests With Python's urllib.request

If you need to perform HTTP requests using Python, then the widely used Requests library is often the way to go. However, if you prefer to use only standard-library Python and minimize dependencies, then you can turn to urllib.request instead.

In this video course, you’ll:

  • Learn the essentials of making basic HTTP requests with urllib.request
  • Explore the inner workings of an HTTP message and how urllib.request represents it
  • Grasp the concept of handling character encodings in HTTP messages
  • Understand common hiccups when using urllib.request and learn how to resolve them

If you’re already familiar with HTTP requests such as GET and POST, then you’re well prepared for this video course. Additionally, you should have prior experience using Python to read and write files, ideally using a context manager.

In the end, you’ll discover that making HTTP requests doesn’t have to be a frustrating experience, despite its reputation. Many of the challenges people face in this process stem from the inherent complexity of the Internet. The good news is that the urllib.request module can help demystify much of this complexity.

What’s Included:

Downloadable Resources:

Related Learning Paths:

About Alexandra Davis

Alexandra Davis Alexandra Davis

Alexandra is an avid Pythonista and course instructor at Real Python based in Arizona. She is a software engineer with a passion for full stack web development and Python.

» More about Alexandra

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

« Browse All Courses