Table of Contents

Interface IUploadEndpoint

Namespace
TypedRest.Endpoints.Raw
Assembly
TypedRest.dll

Endpoint that accepts binary uploads.

public interface IUploadEndpoint : IEndpoint
Inherited Members
Extension Methods

Methods

UploadFromAsync(Stream, string?, string?, CancellationToken)

Uploads data to the endpoint from a stream.

Task UploadFromAsync(Stream stream, string? fileName = null, string? mimeType = null, CancellationToken cancellationToken = default)

Parameters

stream Stream

The stream to read the upload data from.

fileName string

The name of the uploaded file.

mimeType string

The MIME type of the data to upload.

cancellationToken CancellationToken

Used to cancel the request.

Returns

Task

Exceptions

InvalidDataException

BadRequest

AuthenticationException

Unauthorized

UnauthorizedAccessException

Forbidden

KeyNotFoundException

NotFound or Gone

HttpRequestException

Other non-success status code.