class MAGES::Recorder::HttpClientProgressExtensions¶
Overview¶
Provides extension methods for the HttpClient class. More…
class HttpClientProgressExtensions
{
public:
// methods
static async Task DownloadDataAsync(
this HttpClient client,
string requestUrl,
Stream destination,
IProgress progress = null,
CancellationToken cancellationToken = default(CancellationToken)
);
static async Task UploadDataAsync(
this HttpClient client,
string requestUrl,
Stream stream,
IProgress progress = null,
CancellationToken cancellationToken = default
);
};
Detailed Documentation¶
Provides extension methods for the HttpClient class.
Methods¶
static async Task DownloadDataAsync(
this HttpClient client,
string requestUrl,
Stream destination,
IProgress progress = null,
CancellationToken cancellationToken = default(CancellationToken)
)
Downloads data from the specified URL to the specified stream.
Parameters:
client |
The client. |
requestUrl |
The uri. |
destination |
The destination stream. |
progress |
The progress bar implementor. |
cancellationToken |
The cancellation token. |
Returns:
Task.
static async TaskUploadDataAsync( this HttpClient client, string requestUrl, Stream stream, IProgress progress = null, CancellationToken cancellationToken = default )
Uploads data to the specified URL.
Parameters:
client |
The http client. |
requestUrl |
The url to make the request to. |
stream |
The stream to read from. |
progress |
The progress interface. |
cancellationToken |
The cancellation token. |
Returns:
A new task.