Due to how the stream works, it cannot be undone. I found an alternative solution in an MSDN blog post written in 2012. Perhaps it will help you. The author uses GetStringAsyncbut this principle also applies to GetStreamAsync. Article: Wait for HttpClient.GetStringAsync () and cancel .
MSDN GetAsync(...) . ...
CancellationTokenSource cancellationSource = new CancellationTokenSource();
CancellationToken cancellationToken = cancellationSource.Token;
Uri uri = new Uri('some valid web address');
HttpClient client = new HttpClient();
await client.GetAsync(uri, cancellationToken);
cancellationSource.Cancel();
, CancellationTokenSource, CancellationToken.