Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Commit c26292e

Browse files
committed
Update README for proxy
1 parent 6726d60 commit c26292e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,19 @@ def run_gets(client):
130130
loop = asyncio.get_event_loop()
131131
loop.run_until_complete(run_gets(client))
132132
```
133+
134+
## Using a Proxy
135+
If you need to proxy your requests, you can use the helper class `HttpProviderWithProxy`.
136+
```python
137+
from onedrivesdk.helpers import http_provider_with_proxy
138+
139+
proxy = {
140+
'http': 'http://localhost:8888',
141+
'https': 'https://localhost:8888'
142+
}
143+
http = http_provider_with_proxy.HttpProviderWithProxy(proxy, verify_ssl=True)
144+
auth = onedrivesdk.AuthProvider(http, my_client_id, ['onedrive.readwrite'])
145+
client = onedrivesdk.OneDriveClient(my_base_url, auth, http)
146+
```
147+
148+
All requests using that client will be proxied.

0 commit comments

Comments
 (0)