Skip to content

HttpClient - provide timeout per read/write operation in async methods #75188

Open
@karelz

Description

@karelz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-needs-workAPI needs work before it is approved, it is NOT ready for implementationarea-System.Net.Http

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions