Export (0) Print
Expand All

HttpContent.ReadAsStreamAsync Method

.NET Framework 4.5

Serialize the HTTP content and return a stream that represents the content as an asynchronous operation.

Namespace:  System.Net.Http
Assembly:  System.Net.Http (in System.Net.Http.dll)

public Task<Stream> ReadAsStreamAsync()

Return Value

Type: System.Threading.Tasks.Task<Stream>
Returns Task<TResult>.
The task object representing the asynchronous operation.

This operation will not block. The returned Task<TResult> object will complete after all of the stream that represents content has been read.

Once the operation completes, the Result property on the returned task object contains the stream that that represents the HTTP content. The returned stream can then be used to read the content using various stream APIs.

.NET Framework

Supported in: 4.6, 4.5

Supported in: Windows Phone 8.1
Show:
© 2015 Microsoft