MVFC.Pack.HttpClient 5.0.0

dotnet add package MVFC.Pack.HttpClient --version 5.0.0
                    
NuGet\Install-Package MVFC.Pack.HttpClient -Version 5.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MVFC.Pack.HttpClient" Version="5.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MVFC.Pack.HttpClient" Version="5.0.0" />
                    
Directory.Packages.props
<PackageReference Include="MVFC.Pack.HttpClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MVFC.Pack.HttpClient --version 5.0.0
                    
#r "nuget: MVFC.Pack.HttpClient, 5.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MVFC.Pack.HttpClient@5.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MVFC.Pack.HttpClient&version=5.0.0
                    
Install as a Cake Addin
#tool nuget:?package=MVFC.Pack.HttpClient&version=5.0.0
                    
Install as a Cake Tool

MVFC.Pack.HttpClient

🇧🇷 Leia em Português · ← Back to MVFC.Pack

License Platform NuGet Version NuGet Downloads

Metapackage providing dependencies for typed HTTP clients using Refit, HttpClientFactory, and HTTP resilience policies in .NET 9 and 10 applications.

What It Is and What It Is Not

  • What it is: A passive dependency metapackage that consolidates and pins the necessary packages to declare typed REST clients (Refit + HttpClientFactory) and configure resilience pipelines (Microsoft.Extensions.Http.Resilience).
  • What it is not: An HTTP framework, wrapper library, or automatic runtime service registrar. It contains no runtime code, creates no handlers, and registers no services automatically. The consuming application decides all registrations and pipeline configurations explicitly.

Installation

dotnet add package MVFC.Pack.HttpClient

Included Packages

Package Version Purpose
Refit 8.0.0 (net9) / 16.4.0 (net10/11) Declarative, typed REST client for .NET.
Refit.HttpClientFactory 8.0.0 (net9) / 16.4.0 (net10/11) Integrates Refit clients with IHttpClientFactory.
Microsoft.Extensions.Http 9.0.2 (net9) / 10.0.14 (net10) / 11.0.0 (net11) Core IHttpClientFactory abstractions and client configuration.
Microsoft.Extensions.Http.Resilience 9.2.0 (net9) / 10.11.0 (net10) / 11.0.0 (net11) Standard resilience pipelines (retry, circuit breaker, timeout, rate limiter) based on Polly.

Quick Start

In your application startup / DI configuration:

using Microsoft.Extensions.DependencyInjection;
using Refit;

// 1. Define your typed client interface
public interface IPingApi
{
    [Get("/ping")]
    Task<string> PingAsync(CancellationToken cancellationToken = default);
}

// 2. Register with HttpClientFactory and resilience
public static class HttpClientSetup
{
    public static void Configure(IServiceCollection services)
    {
        services.AddRefitClient<IPingApi>()
            .ConfigureHttpClient(client =>
            {
                client.BaseAddress = new Uri("https://api.example.com");
            })
            .AddStandardResilienceHandler();
    }
}

Resilience & Idempotency Warning:
The standard resilience handler includes retry policies that may not be safe for non-idempotent HTTP methods (such as POST or operations with side-effects). Ensure your retry strategy is explicitly adapted to each endpoint's semantics to prevent unintentional duplicate requests.

Compatibility

  • Supported target frameworks in this release: net9.0;net10.0.
  • Compatibility with .NET 9 is aligned with the current repository product line and does not constitute a long-term support commitment.

License

Apache-2.0

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.0 109 11/15/2026