What is HTTPX?
HTTPX provides both synchronous and asynchronous APIs, making it a versatile choice for handling HTTP requests, managing sessions, and working with proxies, authentication, and streaming data. When combined with Toolip, it enables efficient and reliable request execution. Prefer an enterprise-grade guide? Learn more about Oculus Proxies Httpx Integration Guide.1
Install Python
Make sure that Python is installed on your machine.
2
Install HTTPX
- Execute the following to install HTTPX:
- To add support for SOCKS proxies, install it using the command below:
3
Basic Request
Copy the code below to set up HTTPX with Toolip, ensuring you include the authentication credentials:
-
username- Your proxy’s username. -
password- Your proxy’s password. - Basic request shouldn’t require Host and Port.
Python
4
Sending SOCKS5 Request
Use the example below to send a SOCKS5 request with HTTPX:
-
username- Your proxy’s username. -
password- Your proxy’s password. -
host- Your proxy’s host. -
port- Your proxy’s port.
Python
5
Sending Asynchronous Request
Check the following example to perform an asynchronous request using HTTPX:
Python