Course details

Python Requests: HTTP Requests with Python

Python Requests: HTTP Requests with Python


Overview/Description
Expected Duration
Lesson Objectives
Course Number
Expertise Level



Overview/Description

Learners can explore how to use the Python Request package which has simplified the task of constructing HTTP requests in this 16-video lab course, which explores different types of HTTP requests, and examines several ways to handle responses to those requests. Begin by learning how to use the Python request package to make a GET request for data from a server. Then you will observe how to construct a POST request to submit data to a host, and how to send it to a URL. Continue by learning how to use a HEAD request to check the resource information before downloading it by using GET, and how to examine request and response headers. Next, learners will examine a PUT request which has the same effect whether one makes the request once or multiple times, and which is used to overwrite an existing resource. You will learn to use DELETE requests. Finally, you will learn to address responses to requests in both JSON formatted or images.



Expected Duration (hours)
1.7

Lesson Objectives

Python Requests: HTTP Requests with Python

  • discover the key concepts covered in this course
  • install the Python Requests package and set up a workspace
  • make a GET request and explore the response object returned, which includes a status code and headers
  • parse a response body containing JSON-formatted data
  • invoke a GET request that includes parameters
  • use the Requests package to construct a POST request that includes a set of key-value pairs to be submitted to a server
  • submit data to pastebin.com using their APIs and with a POST request
  • retrieve metadata for a resource by means of a HEAD request
  • invoke PUT, OPTIONS, and DELETE requests and recognize the specific use case for each of them
  • set the headers in an HTTP Request and parse the headers in a Response object
  • define the encoding format for the contents in an HTTP Response and download and handle binary content such as images
  • identify the format of an HTTP Response and parse the data accordingly
  • handle successful and unsuccessful HTTP requests according to the status code of the response
  • recognize when an HTTP request has triggered a redirect, explore the redirect history, and configure the read and connect timeout values for a request
  • catch errors that are thrown by HTTP requests by using the exceptions module in the Requests package
  • compare the GET and HEAD requests, summarize the PUT and DELETE requests, and view the redirect history following a GET request
  • Course Number:
    it_pywhpydj_01_enus

    Expertise Level
    Beginner