Skip to content

Commit 668495d

Browse files
committed
rename modules for clarity
1 parent 5a13194 commit 668495d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ r = proxy.request('GET', 'https://proxymesh.com/api/headers/')
4444
2. potentially create helper method(s) for doing this
4545
3. figure out how to patch or extend urllib3 ProxyManager to get proxy response headers in python3.12
4646
``` python
47-
from python_proxy_headers import connection
48-
proxy = connection.ProxyHeaderManager('http://de.proxymesh.com:31280', proxy_headers={'X-ProxyMesh-IP': '46.101.181.63'})
47+
from python_proxy_headers import urllib3_proxy_manager
48+
proxy = urllib3_proxy_manager.ProxyHeaderManager('http://de.proxymesh.com:31280', proxy_headers={'X-ProxyMesh-IP': '46.101.181.63'})
4949
r = proxy.request('GET', 'https://proxymesh.com/api/headers/')
5050
r.headers['X-ProxyMesh-IP']
5151
```
@@ -55,8 +55,8 @@ r.headers['X-ProxyMesh-IP']
5555
5. figure out how python requests uses urllib3 and easiest method for passing in proxy headers
5656
6. potentially create helper methods for doing this
5757
``` python
58-
from python_proxy_headers import adapter
59-
r = adapter.get('https://proxymesh.com/api/headers/', proxies={'http': 'http://de.proxymesh.com:31280', 'https': 'http://de.proxymesh.com:31280'}, proxy_headers={'x-proxymesh-ip': '46.101.236.88'})
58+
from python_proxy_headers import requests_adapter
59+
r = requests_adapter.get('https://proxymesh.com/api/headers/', proxies={'http': 'http://de.proxymesh.com:31280', 'https': 'http://de.proxymesh.com:31280'}, proxy_headers={'x-proxymesh-ip': '46.101.236.88'})
6060
r.headers['X-ProxyMesh-IP']
6161
```
6262
7. pass proxy response headers from urllib3 functions back to requests response

python_proxy_headers/adapter.py renamed to python_proxy_headers/requests_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from requests.adapters import HTTPAdapter
22
from requests.sessions import Session
3-
from .connection import proxy_from_url
3+
from .urllib3_proxy_manager import proxy_from_url
44

55
class HTTPProxyHeaderAdapter(HTTPAdapter):
66
def __init__(self, proxy_headers=None):
File renamed without changes.

0 commit comments

Comments
 (0)