StreamHelper.GetHttpStreamAsync(Uri, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the response stream returned by a HTTP get request.
public static System.Threading.Tasks.Task<Windows.Storage.Streams.IRandomAccessStream> GetHttpStreamAsync (this Uri uri, System.Threading.CancellationToken cancellationToken = default);
static member GetHttpStreamAsync : Uri * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Windows.Storage.Streams.IRandomAccessStream>
<Extension()>
Public Function GetHttpStreamAsync (uri As Uri, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IRandomAccessStream)
Parameters
- uri
- Uri
Uri to request.
- cancellationToken
- CancellationToken
A CancellationToken used to cancel the operation.
Returns
Task<Windows.Storage.Streams.IRandomAccessStream>
The response stream