Class HttpClientProgressExtensions
- Namespace
- Artemis.UI.Shared.Extensions
- Assembly
- Artemis.UI.Shared.dll
Provides extension methods for the HttpClient type.
public static class HttpClientProgressExtensions
- Inheritance
-
objectHttpClientProgressExtensions
Methods
DownloadDataAsync(HttpClient, string, Stream, IProgress<StreamProgress>?, CancellationToken)
Send a GET request to the specified Uri with an HTTP completion option and a cancellation token as an asynchronous operation.
public static Task DownloadDataAsync(this HttpClient client, string requestUrl, Stream destination, IProgress<StreamProgress>? progress, CancellationToken cancellationToken)
Parameters
clientHttpClientThe HTTP client to use.
requestUrlstringThe Uri the request is sent to.
destinationStreamThe destination stream.
progressIProgress<StreamProgress>The progress instance to use for progress indication.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.