Skip to content

Commit e4ce03d

Browse files
chore(docs): add proxy documentation to readme
1 parent f26879d commit e4ce03d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,26 @@ var customer = await client
253253
Console.WriteLine(customer);
254254
```
255255

256+
### Proxies
257+
258+
To route requests through a proxy, configure your client with a custom [`HttpClient`](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=net-10.0):
259+
260+
```csharp
261+
using System.Net;
262+
using System.Net.Http;
263+
using Orb;
264+
265+
var httpClient = new HttpClient
266+
(
267+
new HttpClientHandler
268+
{
269+
Proxy = new WebProxy("https://example.com:8080")
270+
}
271+
);
272+
273+
OrbClient client = new() { HttpClient = httpClient };
274+
```
275+
256276
## Undocumented API functionality
257277

258278
The SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.

0 commit comments

Comments
 (0)