Requests Tutorial
Selected Reading
- Requests - Discussion
- Requests - Useful Resources
- Requests - Quick Guide
- Requests - Web Scraping using Requests
- Requests - Proxy
- Requests - Event Hooks
- Requests - Authentication
- Requests - SSL Certification
- Requests - Handling Sessions
- Requests - Handling History
- Requests - Handling Redirection
- Requests - Handling Timeouts
- Requests - Working with Errors
- Requests - Working with Cookies
- Requests - File Upload
- Handling POST, PUT, PATCH & DELETE Requests
- Requests - Handling GET Requests
- Requests - HTTP Requests Headers
- Handling Response for HTTP Requests
- Requests - Working with Requests
- Requests - How Http Requests Work?
- Requests - Environment Setup
- Requests - Overview
- Requests - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Requests - Proxy
Requests - Proxy
So far, we have seen cpents directly connecting and talking to the server. Using proxy, the interaction happens as follows −
The cpent sends a request to the proxy.
The proxy sends the request to the server.
The server sends back the response to the proxy.
The proxy will send a response back to the cpent.
Using Http-proxy is additional security assigned to manage the data exchange between cpent and server. The requests pbraries also have provision to handle proxy, by using the proxies param as shown below −
Example
import requests proxies = { http :} res = requests.get( , proxies=proxies) print(res.status_code)
The request will route to
:8080 URL.Output
200Advertisements