Table of Contents

Class HttpClientProgressExtensions

Namespace
Artemis.UI.Shared.Extensions
Assembly
Artemis.UI.Shared.dll

Provides extension methods for the HttpClient type.

public static class HttpClientProgressExtensions
Inheritance
object
HttpClientProgressExtensions

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

client HttpClient

The HTTP client to use.

requestUrl string

The Uri the request is sent to.

destination Stream

The destination stream.

progress IProgress<StreamProgress>

The progress instance to use for progress indication.

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task