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
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor