mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-24 01:28:27 +01:00
Added HttpClientHandler as a constructor param to ApiClient, and added automatic decompression.
This commit is contained in:
parent
8edc1ce710
commit
32f7ecf4d0
@@ -13,8 +13,15 @@ namespace MediaBrowser.ApiInteraction
|
||||
protected HttpClient HttpClient { get; private set; }
|
||||
|
||||
public BaseClient()
|
||||
: this(new HttpClientHandler())
|
||||
{
|
||||
HttpClient = new HttpClient();
|
||||
}
|
||||
|
||||
public BaseClient(HttpClientHandler clientHandler)
|
||||
{
|
||||
clientHandler.AutomaticDecompression = System.Net.DecompressionMethods.GZip;
|
||||
|
||||
HttpClient = new HttpClient(clientHandler);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
||||
Reference in New Issue
Block a user