HttpClient.GetInputStreamAsync | getInputStreamAsync method
Send a GET request to the specified Uri and return the response body as a stream in an asynchronous operation.
httpClient.getInputStreamAsync(uri).done( /* Your success and error handlers */ );
The Uri the request is sent to.
The object representing the asynchronous operation.
A number of exceptions can occur when calling this method. Only a few of the possible errors that can cause exceptions are listed.
You must write code to handle exceptions when you call this method. Exceptions can result from parameter validation errors, name resolutions failures, and network errors. Exceptions from network errors (loss of connectivity, connection failures, and HTTP server failures, for example) can happen at any time. These errors result in exceptions being thrown. If not handled by your app, an exception can cause your entire app to be terminated by the runtime.
An app can use the HRESULT from the exception to learn more detailed information on the error that caused the exception.
For more information on possible exceptions and how to handle exceptions, see Handling exceptions in network apps.
The uri parameter was a null reference (Nothing in Visual Basic).
This operation will not block. The returned IAsyncOperationWithProgress(IInputStream, 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.
Minimum supported client
Minimum supported server
|Windows Server 2012 R2|