Export (0) Print
Expand All

HttpContent.CopyToAsync Method (Stream)

.NET Framework 4.6 and 4.5

Serialize the HTTP content into a stream of bytes and copies it to the stream object provided as the stream parameter.

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

public Task CopyToAsync(
	Stream stream
)

Parameters

stream
Type: System.IO.Stream

The target stream.

Return Value

Type: System.Threading.Tasks.Task
Returns Task.
The task object representing the asynchronous operation.

This operation will not block. The returned Task<TResult> object will complete after all of the content has been written to the stream object passed as the stream parameter.

.NET Framework

Supported in: 4.6, 4.5

Supported in: Windows Phone 8.1
Show:
© 2015 Microsoft