|
|
@ -22,16 +22,6 @@ namespace MediaBrowser.Common.Net
|
|
|
|
_httpClient = httpClient;
|
|
|
|
_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>
|
|
|
|
/// <summary>
|
|
|
|
/// Make GET request.
|
|
|
|
/// Make GET request.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -42,17 +32,6 @@ namespace MediaBrowser.Common.Net
|
|
|
|
return _httpClient.GetAsync(url);
|
|
|
|
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>
|
|
|
|
/// <summary>
|
|
|
|
/// Make GET request.
|
|
|
|
/// Make GET request.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -64,16 +43,6 @@ namespace MediaBrowser.Common.Net
|
|
|
|
return _httpClient.GetAsync(url, cancellationToken);
|
|
|
|
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>
|
|
|
|
/// <summary>
|
|
|
|
/// Get stream.
|
|
|
|
/// Get stream.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|