Fix build
This commit is contained in:
parent
ac5c0866f3
commit
f6b8cd4b46
|
@ -22,16 +22,6 @@ namespace MediaBrowser.Common.Net
|
|||
_httpClient = httpClient;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make GET request.
|
||||
/// </summary>
|
||||
/// <param name="url">Url to request.</param>
|
||||
/// <returns>A <see cref="Task"/> containing the <see cref="HttpResponseMessage"/>.</returns>
|
||||
public Task<HttpResponseMessage> GetAsync(string url)
|
||||
{
|
||||
return _httpClient.GetAsync(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make GET request.
|
||||
/// </summary>
|
||||
|
@ -42,17 +32,6 @@ namespace MediaBrowser.Common.Net
|
|||
return _httpClient.GetAsync(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make GET request.
|
||||
/// </summary>
|
||||
/// <param name="url">Url to request.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>A <see cref="Task"/> containing the <see cref="HttpResponseMessage"/>.</returns>
|
||||
public Task<HttpResponseMessage> GetAsync(string url, CancellationToken cancellationToken)
|
||||
{
|
||||
return _httpClient.GetAsync(url, cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make GET request.
|
||||
/// </summary>
|
||||
|
@ -64,16 +43,6 @@ namespace MediaBrowser.Common.Net
|
|||
return _httpClient.GetAsync(url, cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get stream.
|
||||
/// </summary>
|
||||
/// <param name="url">Url to get stream from.</param>
|
||||
/// <returns>A <see cref="Task"/> containing the <see cref="Stream"/>.</returns>
|
||||
public Task<Stream> GetStreamAsync(string url)
|
||||
{
|
||||
return _httpClient.GetStreamAsync(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get stream.
|
||||
/// </summary>
|
||||
|
|
|
@ -8,7 +8,9 @@ namespace MediaBrowser.Common.Net
|
|||
/// </summary>
|
||||
public class DefaultHttpClientHandler : HttpClientHandler
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DefaultHttpClientHandler"/> class.
|
||||
/// </summary>
|
||||
public DefaultHttpClientHandler()
|
||||
{
|
||||
// TODO change to DecompressionMethods.All with .NET5
|
||||
|
|
|
@ -14,10 +14,13 @@ namespace MediaBrowser.Common.Net
|
|||
{
|
||||
private readonly ProductInfoHeaderValue[] _userAgentValues;
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UserAgentDelegatingHandler"/> class.
|
||||
/// </summary>
|
||||
/// <param name="applicationHost">Instance of the <see cref="IApplicationHost"/> interface.</param>
|
||||
public UserAgentDelegatingHandler(IApplicationHost applicationHost)
|
||||
{
|
||||
_userAgentValues = new []
|
||||
_userAgentValues = new[]
|
||||
{
|
||||
new ProductInfoHeaderValue(applicationHost.Name.Replace(' ', '-'), applicationHost.ApplicationVersionString),
|
||||
new ProductInfoHeaderValue($"({Environment.OSVersion}; {applicationHost.ApplicationUserAgentAddress})")
|
||||
|
|
Loading…
Reference in New Issue
Block a user