Skip to content
SPECIFICTION
Get listed

Refit

reactiveui.github.io

WebWindowsAPI
Visit reactiveui.github.io
Spec score 7.3 #35 of 38 in API clients

Spec sheet

Purpose
Refit lets an app describe web service calls on C# interfaces and generates their implementations during the build.Read 11 Oct 2026 · reactiveui.net
Available platforms
web_and_desktopRead 22 Sep 2026 · reactiveui.github.io
Free plan
YesRead 22 Sep 2026 · reactiveui.github.io
License
The Refit project is licensed under the MIT license.Read 11 Oct 2026 · github.com
Ahead-of-time compilation
Refit documents generated clients and JSON code for apps compiled ahead of time.Read 11 Oct 2026 · reactiveui.net
Automated test runs
YesRead 22 Sep 2026 · reactiveui.github.io
Build requirements
The source generator requires Roslyn 4.8 or newer and PackageReference; the README names .NET SDK 8.0.100 and Visual Studio 2022 17.8 as providing that compiler baseline.Read 11 Oct 2026 · github.com
Dependency injection
Refit.HttpClientFactory registers clients with dependency injection and IHttpClientFactory.Read 11 Oct 2026 · github.com
Diagnostics
Refit has a diagnostics guide for observing client activity.Read 11 Oct 2026 · reactiveui.net
History
The license file says Anna Betts created Refit in 2012 and ReactiveUI has maintained it since.Read 11 Oct 2026 · github.com
HTTP client
Generated implementations send requests through HttpClient, which the app controls.Read 11 Oct 2026 · reactiveui.net
HTTP client control
Applications retain control of HttpClient, cancellation, and serialization.Read 11 Oct 2026 · github.com
Integration
Refit uses HttpClient and documents registering clients with dependency injection.Read 11 Oct 2026 · reactiveui.net
Native AOT
The documentation describes generated clients and JSON metadata for apps compiled ahead of time.Read 11 Oct 2026 · reactiveui.net
Package
The project instructs users to install the Refit NuGet package in the project that declares the interface.Read 11 Oct 2026 · reactiveui.net
Request definition
Attributes on interface methods describe HTTP methods, routes, headers, and request bodies.Read 11 Oct 2026 · github.com
Request types
Refit supports routes and HTTP methods, including route placeholders populated from method arguments.Read 11 Oct 2026 · reactiveui.net
Requests and responses
The library supports route and query parameters, headers, serialized bodies, forms, and response types including Task<T>, ValueTask<T>, and IObservable<T>.Read 11 Oct 2026 · github.com
Return types
The documentation lists Task<T>, ValueTask<T>, IObservable<T>, response wrappers and IAsyncEnumerable<T> for streaming replies.Read 11 Oct 2026 · reactiveui.net
Serialization
Refit reads and writes JSON with System.Text.Json and can use its source-generated metadata.Read 11 Oct 2026 · reactiveui.net
Streaming
Refit supports streamed JSON arrays, JSON Lines, and server-sent events.Read 11 Oct 2026 · github.com
Target frameworks
The source projects target .NET 8, 9, 10, and 11, plus .NET Framework 4.6.2 through 4.8.1.Read 11 Oct 2026 · github.com
Testing
Refit’s testing guidance shows how to provide local replies, inspect requests and check which routes were called.Read 11 Oct 2026 · reactiveui.net

Where Specifiction places it

Alternatives to RefitAll alternatives →