HttpContent.ReadAsStream Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Serializes the HTTP content and returns a stream that represents the content.
Overloads
ReadAsStream() |
Serializes the HTTP content and returns a stream that represents the content. |
ReadAsStream(CancellationToken) |
Serializes the HTTP content and returns a stream that represents the content. |
Remarks
Note that this method will internally buffer the content unless CreateContentReadStream(CancellationToken) has been implemented to do otherwise.
ReadAsStream()
- Source:
- HttpContent.cs
- Source:
- HttpContent.cs
- Source:
- HttpContent.cs
Serializes the HTTP content and returns a stream that represents the content.
public:
System::IO::Stream ^ ReadAsStream();
public System.IO.Stream ReadAsStream ();
member this.ReadAsStream : unit -> System.IO.Stream
Public Function ReadAsStream () As Stream
Returns
The stream that represents the HTTP content.
Applies to
ReadAsStream(CancellationToken)
- Source:
- HttpContent.cs
- Source:
- HttpContent.cs
- Source:
- HttpContent.cs
Serializes the HTTP content and returns a stream that represents the content.
public:
System::IO::Stream ^ ReadAsStream(System::Threading::CancellationToken cancellationToken);
public System.IO.Stream ReadAsStream (System.Threading.CancellationToken cancellationToken);
member this.ReadAsStream : System.Threading.CancellationToken -> System.IO.Stream
Public Function ReadAsStream (cancellationToken As CancellationToken) As Stream
Parameters
- cancellationToken
- CancellationToken
The cancellation token to cancel the operation.
Returns
The stream that represents the HTTP content.
Exceptions
The cancellation token was canceled. This exception is stored into the returned task.
Applies to
Tilbakemeldinger
https://aka.ms/ContentUserFeedback.
Kommer snart: Gjennom 2024 faser vi ut GitHub Issues som tilbakemeldingsmekanisme for innhold, og erstatter det med et nytt system for tilbakemeldinger. Hvis du vil ha mer informasjon, kan du se:Send inn og vis tilbakemelding for