Skip to content

HttpClient.GetStreamAsync raising HttpRequestException #9148

Open
@roy-cohen273

Description

@roy-cohen273

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>

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions