Skip to content

HttpClient.GetStreamAsync raising HttpRequestException #9148

Open

Description

Issue description

The docs for HttpClient.GetStreamAsync state that an HttpRequestException will be raised if:

The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation (or timeout for .NET Framework only).

However, an HttpRequestException is also raised when the request completes with a non-success status code.

Target framework

  • .NET Core (3.1, 5, 6, 7)
  • .NET Framework
  • .NET Standard
dotnet --info output or About VS info
<replace>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    ⌚ Not TriagedPri3Indicates issues/PRs that are low priorityarea-System.NetuntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions