Analyzing Login Responses

Learn how to analyze the response of an HTTP POST request to determine the validity of credentials.

Introduction

Previously, we explored a login page that used HTTP POST requests to send user credentials to a back-end application. Based on our knowledge of how the system worked, we could use the Python requests library to generate POST requests directly and send them to the backend for validation.

In the current version of the code, we could see whether the credentials were correct based on the output from the script. Now, we’ll work on processing the login responses and automatically determining whether or not the provided credentials are correct.

Examining a login response

To start, let’s take a look at the following version of the code:

Get hands-on with 1400+ tech skills courses.