ByteArrayContent.CreateContentReadStream(CancellationToken) Method

Definition

Creates an HTTP content stream for reading. It uses the memory from the ByteArrayContent as a backing store.

C#
protected override System.IO.Stream CreateContentReadStream (System.Threading.CancellationToken cancellationToken);

Parameters

cancellationToken
CancellationToken

The cancellation token to cancel the operation.

Returns

The HTTP content stream.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Applies to

Produkt Versjoner
.NET 5, 6, 7, 8, 9