Skip to content

Commit 1fd2998

Browse files
chore(docs): add proxy documentation to readme
1 parent a6d9731 commit 1fd2998

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,26 @@ var response = await client
582582
Console.WriteLine(response);
583583
```
584584

585+
### Proxies
586+
587+
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):
588+
589+
```csharp
590+
using System.Net;
591+
using System.Net.Http;
592+
using Stagehand;
593+
594+
var httpClient = new HttpClient
595+
(
596+
new HttpClientHandler
597+
{
598+
Proxy = new WebProxy("https://example.com:8080")
599+
}
600+
);
601+
602+
StagehandClient client = new() { HttpClient = httpClient };
603+
```
604+
585605
## Undocumented API functionality
586606

587607
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)