HttpClient.GetStreamAsync HttpClient.GetStreamAsync HttpClient.GetStreamAsync HttpClient.GetStreamAsync Method

Definition

Send a GET request to the specified Uri and return the response body as a stream in an asynchronous operation.

Overloads

GetStreamAsync(Uri) GetStreamAsync(Uri) GetStreamAsync(Uri) GetStreamAsync(Uri)

Send a GET request to the specified Uri and return the response body as a stream in an asynchronous operation.

GetStreamAsync(String) GetStreamAsync(String) GetStreamAsync(String) GetStreamAsync(String)

Send a GET request to the specified Uri and return the response body as a stream in an asynchronous operation.

Remarks

The operation will not block.

GetStreamAsync(Uri) GetStreamAsync(Uri) GetStreamAsync(Uri) GetStreamAsync(Uri)

Send a GET request to the specified Uri and return the response body as a stream in an asynchronous operation.

public:
 System::Threading::Tasks::Task<System::IO::Stream ^> ^ GetStreamAsync(Uri ^ requestUri);
public System.Threading.Tasks.Task<System.IO.Stream> GetStreamAsync (Uri requestUri);
member this.GetStreamAsync : Uri -> System.Threading.Tasks.Task<System.IO.Stream>
Public Function GetStreamAsync (requestUri As Uri) As Task(Of Stream)

Parameters

requestUri
Uri Uri Uri Uri

The Uri the request is sent to.

Returns

The task object representing the asynchronous operation.

Exceptions

The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.

Remarks

This operation will not block. The returned Task<TResult> object will complete after the response headers are read. This method does not read nor buffer the response body.

GetStreamAsync(String) GetStreamAsync(String) GetStreamAsync(String) GetStreamAsync(String)

Send a GET request to the specified Uri and return the response body as a stream in an asynchronous operation.

public:
 System::Threading::Tasks::Task<System::IO::Stream ^> ^ GetStreamAsync(System::String ^ requestUri);
public System.Threading.Tasks.Task<System.IO.Stream> GetStreamAsync (string requestUri);
member this.GetStreamAsync : string -> System.Threading.Tasks.Task<System.IO.Stream>
Public Function GetStreamAsync (requestUri As String) As Task(Of Stream)

Parameters

requestUri
String String String String

The Uri the request is sent to.

Returns

The task object representing the asynchronous operation.

Exceptions

The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.

Remarks

This operation will not block. The returned Task<TResult> object will complete after the response headers are read. This method does not read nor buffer the response body.

Applies to