TypedRest for .NET 1.3.6
build type-safe fluent-style REST API clients
TypedRest.Endpoints.Raw.UploadEndpointExtensions Class Reference

Provides extension methods for IUploadEndpoint. More...

Static Public Member Functions

static async Task UploadFromAsync (this IUploadEndpoint endpoint, string path, string? mimeType=null, CancellationToken cancellationToken=default)
 Uploads data to the endpoint from a file. More...

Detailed Description

Provides extension methods for IUploadEndpoint.

Member Function Documentation

◆ UploadFromAsync()

static async Task TypedRest.Endpoints.Raw.UploadEndpointExtensions.UploadFromAsync ( this IUploadEndpoint  endpoint,
string  path,
string?  mimeType = null,
CancellationToken  cancellationToken = default 

Uploads data to the endpoint from a file.

endpointThe blob endpoint.
pathThe path of the file to read the upload data from.
mimeTypeThe MIME type of the data to upload.
cancellationTokenUsed to cancel the request.
KeyNotFoundExceptionHttpStatusCode.NotFound or HttpStatusCode.Gone
HttpRequestExceptionOther non-success status code.

The documentation for this class was generated from the following file: