Open
Description
Users need timeout per read/write operation in async operations when using HttpClient
-- i.e. on HttpContent
:
Read/write operations can achieve it via CancellationTokens, however CopyToAsync
has timeout only for the overall operation, not for individual read/write operations.
Note: Stream.ReadTimeout
and Stream.WriteTimeout
intentionally don't apply to async operations. Changing that would be a breaking change.
Repro: #36822 (comment)
Background and lengthy discussion in #74568