BlobBaseClient.DownloadContentAsync Method

Definition

Overloads

DownloadContentAsync()

The DownloadContentAsync() operation downloads a blob from the service, including its metadata and properties.

For more information, see Get Blob.

DownloadContentAsync(CancellationToken)

The DownloadContentAsync(CancellationToken) operation downloads a blob from the service, including its metadata and properties.

For more information, see Get Blob.

DownloadContentAsync(BlobDownloadOptions, CancellationToken)

The DownloadContentAsync(BlobDownloadOptions, CancellationToken) operation downloads a blob from the service, including its metadata and properties.

For more information, see Get Blob.

DownloadContentAsync()

The DownloadContentAsync() operation downloads a blob from the service, including its metadata and properties.

For more information, see Get Blob.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>> DownloadContentAsync ();
abstract member DownloadContentAsync : unit -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>>
override this.DownloadContentAsync : unit -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>>
Public Overridable Function DownloadContentAsync () As Task(Of Response(Of BlobDownloadResult))

Returns

Task<Response<BlobDownloadResult>>

A Response<T> describing the downloaded blob. Content contains the blob's data.

Remarks

A RequestFailedException will be thrown if a failure occurs.

This API is a prefered way to fetch blobs that can fit into memory. The content is provided as BinaryData that provides a lightweight abstraction for a payload of bytes. It provides convenient helper methods to get out commonly used primitives, such as streams, strings, or bytes. Consider the following alternatives:

  • DownloadToAsyncto stream blob content to a path or a Stream
  • DownloadStreamingAsyncas a replacement to this API. Use it to access network stream directly for any advanced scenario.

Applies to

DownloadContentAsync(CancellationToken)

The DownloadContentAsync(CancellationToken) operation downloads a blob from the service, including its metadata and properties.

For more information, see Get Blob.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>> DownloadContentAsync (System.Threading.CancellationToken cancellationToken);
abstract member DownloadContentAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>>
override this.DownloadContentAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>>
Public Overridable Function DownloadContentAsync (cancellationToken As CancellationToken) As Task(Of Response(Of BlobDownloadResult))

Parameters

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

Task<Response<BlobDownloadResult>>

A Response<T> describing the downloaded blob. Content contains the blob's data.

Remarks

A RequestFailedException will be thrown if a failure occurs.

This API is a prefered way to fetch blobs that can fit into memory. The content is provided as BinaryData that provides a lightweight abstraction for a payload of bytes. It provides convenient helper methods to get out commonly used primitives, such as streams, strings, or bytes. Consider the following alternatives:

  • DownloadToAsyncto stream blob content to a path or a Stream
  • DownloadStreamingAsyncas a replacement to this API. Use it to access network stream directly for any advanced scenario.

Applies to

DownloadContentAsync(BlobDownloadOptions, CancellationToken)

The DownloadContentAsync(BlobDownloadOptions, CancellationToken) operation downloads a blob from the service, including its metadata and properties.

For more information, see Get Blob.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>> DownloadContentAsync (Azure.Storage.Blobs.Models.BlobDownloadOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadContentAsync : Azure.Storage.Blobs.Models.BlobDownloadOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>>
override this.DownloadContentAsync : Azure.Storage.Blobs.Models.BlobDownloadOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadResult>>
Public Overridable Function DownloadContentAsync (options As BlobDownloadOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BlobDownloadResult))

Parameters

options
BlobDownloadOptions

Optional parameters for downloading this blob.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

Task<Response<BlobDownloadResult>>

A Response<T> describing the downloaded blob. Content contains the blob's data.

Remarks

A RequestFailedException will be thrown if a failure occurs.

This API is a prefered way to fetch blobs that can fit into memory. The content is provided as BinaryData that provides a lightweight abstraction for a payload of bytes. It provides convenient helper methods to get out commonly used primitives, such as streams, strings, or bytes. Consider the following alternatives:

  • DownloadToAsyncto stream blob content to a path or a Stream
  • DownloadStreamingAsyncas a replacement to this API. Use it to access network stream directly for any advanced scenario.

Applies to