HttpClient.TryGetInputStreamAsync(Uri) HttpClient.TryGetInputStreamAsync(Uri) HttpClient.TryGetInputStreamAsync(Uri) HttpClient.TryGetInputStreamAsync(Uri) HttpClient.TryGetInputStreamAsync(Uri) Method

Definition

Send a GET request to the specified Uri and return the response body as a stream in an asynchronous operation. For programming guidance for the HttpClient class, and code examples, see the HttpClient conceptual topic.

public : IAsyncOperationWithProgress<HttpGetInputStreamResult, HttpProgress> TryGetInputStreamAsync(Uri uri)
IAsyncOperationWithProgress<HttpGetInputStreamResult, HttpProgress> TryGetInputStreamAsync(Uri uri) const;
public IAsyncOperationWithProgress<HttpGetInputStreamResult, HttpProgress> TryGetInputStreamAsync(Uri uri)
Public Function TryGetInputStreamAsync(uri As Uri) As IAsyncOperationWithProgress(Of HttpGetInputStreamResultHttpProgress)
Windows.Web.Http.HttpClient.tryGetInputStreamAsync(uri).done( /* Your success and error handlers */ );

Parameters

uri
Uri Uri Uri

The Uri the request is sent to.

Returns

Additional features and requirements

Device family
Windows 10, version 1903 (introduced v10.0.18362.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v8)

Remarks

This operation will not block. The returned IAsyncOperationWithProgress(HttpGetInputStreamResult, HttpProgress) object will complete after the whole response body is read. This method does not buffer the stream, so this method can support long streams of arbitrary length.

See also