Table of Contents

HttpPutAsync Method

Definition

Namespace
Cuemon.Net.Http
Assemblies
Cuemon.Net.dll
Source
src/Cuemon.Net/Http/HttpManager.cs

HttpPutAsync(Uri, string, Stream, CancellationToken)

Send a PUT request to the specified Uri as an asynchronous operation.

public Task<HttpResponseMessage> HttpPutAsync(Uri location, string contentType, Stream content, CancellationToken ct = default)

Parameters

location Uri

The Uri to request.

contentType string

The Content-Type header of the HTTP request sent to the server.

content Stream

The HTTP request content sent to the server.

ct CancellationToken

The cancellation token to cancel operation.

Returns

Task<HttpResponseMessage>

The task object representing the asynchronous operation.

Exceptions

ArgumentNullException

contentType cannot be null -or- content cannot be null.

HttpPutAsync(Uri, MediaTypeHeaderValue, Stream, CancellationToken)

Send a PUT request to the specified Uri as an asynchronous operation.

public Task<HttpResponseMessage> HttpPutAsync(Uri location, MediaTypeHeaderValue contentType, Stream content, CancellationToken ct = default)

Parameters

location Uri

The Uri to request.

contentType MediaTypeHeaderValue

The Content-Type header of the HTTP request sent to the server.

content Stream

The HTTP request content sent to the server.

ct CancellationToken

The cancellation token to cancel operation.

Returns

Task<HttpResponseMessage>

The task object representing the asynchronous operation.

Exceptions

ArgumentNullException

contentType cannot be null -or- content cannot be null.