How to better handle exceptions with HttpClient.

This page summarizes the projects mentioned and recommended in the original post on /r/csharp

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • Polly

    Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.

  • Look into Polly resilience library. You can do much more with it, like automatic retries etc.

  • Flurl.Http

    Fluent URL builder and testable HTTP client for .NET

  • Usually I'm very reluctant to use 3rd party libraries, but I made very good experience with the Flurl library. It is a lightweight wrapper around the HttpClient, with a minimum of dependencies, and it makes the code so much more readable.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts