dotnet · dotnet/HttpRequestException
HttpRequestException
HttpRequestException
Thrown by HttpClient when an HTTP request fails due to an underlying connection problem, DNS failure, or TLS error. For non-success HTTP status codes, check response.EnsureSuccessStatusCode() or response.IsSuccessStatusCode instead. The StatusCode property (.NET 5+) carries the HTTP status when available.