HttpPatchAsync Method
Definition
- Namespace
- Cuemon.Extensions.Net.Http
- Assemblies
- Cuemon.Extensions.Net.dll
HttpPatchAsync(Uri, string, Stream, CancellationToken)
Send a PATCH request to the specified Uri as an asynchronous operation.
public static Task<HttpResponseMessage> HttpPatchAsync(this Uri location, string contentType, Stream content, CancellationToken ct = default)
Parameters
locationUriThe Uri to extend.
contentTypestringThe Content-Type header of the HTTP request sent to the server.
contentStreamThe HTTP request content sent to the server.
ctCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<HttpResponseMessage>
The task object representing the asynchronous operation.
Exceptions
- ArgumentNullException
locationcannot be null.
HttpPatchAsync(Uri, MediaTypeHeaderValue, Stream, CancellationToken)
Send a PATCH request to the specified Uri as an asynchronous operation.
public static Task<HttpResponseMessage> HttpPatchAsync(this Uri location, MediaTypeHeaderValue contentType, Stream content, CancellationToken ct = default)
Parameters
locationUriThe Uri to extend.
contentTypeMediaTypeHeaderValueThe Content-Type header of the HTTP request sent to the server.
contentStreamThe HTTP request content sent to the server.
ctCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<HttpResponseMessage>
The task object representing the asynchronous operation.
Exceptions
- ArgumentNullException
locationcannot be null.