reactiveui/refit

The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live...

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 6 minutes ago
Added to GitGenius on September 6th, 2026
Created on July 22nd, 2013
Open Issues & Pull Requests: 2 (+0)
GitHub issues: Enabled
Number of forks: 784
Total Stargazers: 9,567 (+0)
Total Subscribers: 165 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

Refit is a type-safe REST client library for .NET that automatically generates HTTP clients from interface definitions.

Refit solves the problem of writing boilerplate HTTP client code by letting developers define REST APIs as C# interfaces decorated with attributes. The library uses code generation to create implementations that handle HTTP requests, serialization, and response mapping automatically. This approach eliminates manual construction of HTTP calls and reduces the surface area for common mistakes in REST client implementations.

Refit suits projects across .NET Core, Xamarin, and full .NET Framework that need to consume REST APIs with strong typing and minimal ceremony. It integrates with the standard HttpClientFactory pattern for dependency injection and lifecycle management. The tool is particularly valuable when working with multiple API endpoints, as the interface-based approach scales better than hand-written clients and provides compile-time verification of API contracts. For testing, the Refit.Testing package provides declarative route tables to stub responses and verify requests without hitting real endpoints.

The project maintains active development with regular updates addressing both core functionality and ecosystem integration. The maintainers provide multiple specialized packages including Refit.HttpClientFactory for modern dependency injection patterns, Refit.Newtonsoft.Json for legacy JSON serialization needs, and Refit.Testing for test scenarios. Documentation is comprehensive with a dedicated website covering common patterns and advanced usage.