Python Requests: HTTP Requests with Python

Python 3.7    |    Beginner
  • 16 videos | 1h 42m 9s
  • Includes Assessment
  • Earns a Badge
Rating 4.5 of 179 users Rating 4.5 of 179 users (179)
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.

WHAT YOU WILL LEARN

  • 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

IN THIS COURSE

  • 2m 19s
  • 6m 52s
    During this video, you will learn how to install the Python Requests package and set up a workspace. FREE ACCESS
  • Locked
    3.  A Basic GET Request
    5m 31s
    In this video, you will learn how to make a GET request and explore the response object returned. This object includes a status code and headers. FREE ACCESS
  • Locked
    4.  Exploring an HTTP Response Containing JSON Data
    6m 44s
    To parse a response body containing JSON-formatted data, use the JSON.parse() method. FREE ACCESS
  • Locked
    5.  Including Parameters in a GET Request
    5m 44s
    To make a GET request that includes parameters, you will need to add them to the URL of the request. FREE ACCESS
  • Locked
    6.  A Basic POST Request
    9m 47s
    In this video, learn how to use the Requests package to construct a POST request that includes a set of key-value pairs to be submitted to a server. FREE ACCESS
  • Locked
    7.  A POST Request with Multiple Parameters
    5m 2s
    Learn how to submit data to pastebin.com using their APIs with a POST request. FREE ACCESS
  • Locked
    8.  The HEAD Request
    4m 25s
    Learn how to retrieve metadata for a resource by making a HEAD request. FREE ACCESS
  • Locked
    9.  The PUT, OPTIONS, and DELETE Requests
    7m 17s
    In this video, you will make PUT, OPTIONS, and DELETE requests and recognize the specific use case for each of them. FREE ACCESS
  • Locked
    10.  Working with Request and Response Headers
    7m 27s
    Learn how to set the headers in an HTTP Request and parse the headers in a Response object. FREE ACCESS
  • Locked
    11.  Content Encoding and Binary Response Data
    8m 20s
    In this video, you will learn how to define the encoding format for the contents in an HTTP Response and how to download and handle binary content such as images. FREE ACCESS
  • Locked
    12.  Handling Responses in Different Formats
    9m 13s
    Find out how to identify the format of an HTTP Response and parse the data accordingly. FREE ACCESS
  • Locked
    13.  HTTP Status Codes
    5m 28s
    In this video, you will learn how to handle successful and unsuccessful HTTP requests according to the status code of the response. FREE ACCESS
  • Locked
    14.  Redirects and Timeouts
    9m 50s
    Upon completion of this video, you will be able to recognize when an HTTP request has triggered a redirect, explore the redirect history, and configure the read and connect timeout values for a request. FREE ACCESS
  • Locked
    15.  Exceptions
    3m 30s
    Learn how to catch errors that are thrown by HTTP requests by using the exceptions module in the Requests package. FREE ACCESS
  • Locked
    16.  Exercise: HTTP Requests with Python
    4m 39s
    Learn how to compare the GET and HEAD requests, summarize the PUT and DELETE requests, and view the redirect history following a GET request. FREE ACCESS

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.

Digital badges are yours to keep, forever.

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.7 of 201 users Rating 4.7 of 201 users (201)
Rating 4.5 of 226 users Rating 4.5 of 226 users (226)
Rating 4.3 of 627 users Rating 4.3 of 627 users (627)