SwadhyAI Notes

All Python notes

Python Requests Module 🌐

Requests Module

The requests module allows you to send HTTP requests using Python.

✨ Common Requests Methods

MethodDescription
delete()Sends a DELETE request to the specified url
get()Sends a GET request to the specified url
head()Sends a HEAD request to the specified url
patch()Sends a PATCH request to the specified url
post()Sends a POST request to the specified url
put()Sends a PUT request to the specified url
request()Constructs and sends a Request object

💡 Did You Know?

The HTTP request returns a Response Object with all the response data (content, encoding, status, etc).