Interface IBlobEndpoint
Endpoint for a binary blob that can be downloaded or uploaded.
public interface IBlobEndpoint : IEndpoint
- Inherited Members
- Extension Methods
Properties
DeleteAllowed
Indicates whether the server has specified DeleteAsync(CancellationToken) is currently allowed.
bool? DeleteAllowed { get; }
Property Value
- bool?
true
if the method is allowed,false
if the method is not allowed,null
If no request has been sent yet or the server did not specify allowed methods.
Remarks
Uses cached data from last response.
DownloadAllowed
Indicates whether the server has specified DownloadAsync(CancellationToken) is currently allowed.
bool? DownloadAllowed { get; }
Property Value
- bool?
true
if the method is allowed,false
if the method is not allowed,null
If no request has been sent yet or the server did not specify allowed methods.
Remarks
Uses cached data from last response.
UploadAllowed
Indicates whether the server has specified UploadFromAsync(Stream, string?, CancellationToken) is currently allowed.
bool? UploadAllowed { get; }
Property Value
- bool?
true
if the method is allowed,false
if the method is not allowed,null
If no request has been sent yet or the server did not specify allowed methods.
Remarks
Uses cached data from last response.
Methods
DeleteAsync(CancellationToken)
Deletes the blob from the server.
Task DeleteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenUsed to cancel the request.
Returns
Exceptions
- InvalidDataException
- AuthenticationException
- UnauthorizedAccessException
- KeyNotFoundException
- HttpRequestException
Other non-success status code.
DownloadAsync(CancellationToken)
Downloads the blob's content to a stream.
Task<Stream> DownloadAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenUsed to cancel the request.
Returns
Exceptions
- AuthenticationException
- UnauthorizedAccessException
- KeyNotFoundException
- HttpRequestException
Other non-success status code.
ProbeAsync(CancellationToken)
Queries the server about capabilities of the endpoint without performing any action.
Task ProbeAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenUsed to cancel the request.
Returns
Exceptions
- AuthenticationException
- UnauthorizedAccessException
- KeyNotFoundException
- HttpRequestException
Other non-success status code.
UploadFromAsync(Stream, string?, CancellationToken)
Uploads data as the blob's content from a stream.
Task UploadFromAsync(Stream stream, string? mimeType = null, CancellationToken cancellationToken = default)
Parameters
stream
StreamThe stream to read the upload data from.
mimeType
stringThe MIME type of the data to upload.
cancellationToken
CancellationTokenUsed to cancel the request.
Returns
Exceptions
- InvalidDataException
- AuthenticationException
- UnauthorizedAccessException
- HttpRequestException
Other non-success status code.