Spotify.NET/SpotifyAPI.Docs/docs/proxy.md

27 lines
582 B
Markdown
Raw Permalink Normal View History

2020-06-03 16:44:13 +01:00
---
id: proxy
title: Proxy
---
2020-06-05 12:35:21 +01:00
import useBaseUrl from '@docusaurus/useBaseUrl';
2020-06-03 16:44:13 +01:00
The included `HTTPClient` has full proxy configuration support:
```csharp
var httpClient = new NetHttpClient(new ProxyConfig("localhost", 8080)
{
User = "",
Password = "",
SkipSSLCheck = false,
});
var config = SpotifyClientConfig
.CreateDefault()
.WithHTTPClient(httpClient);
var spotify = new SpotifyClient(config);
```
As an example, [mitmproxy](https://mitmproxy.org/) can be used to inspect the requests and responses:
2020-06-05 12:35:21 +01:00
<img alt="mitmproxy" src={useBaseUrl('img/mitmproxy.png')} />