Refit is a library heavily inspired by Square’s Retrofit library, and it turns your REST API into a live interface. Refit currently supports the following platforms and any .NET Standard 2.0 target. Every method must have an HTTP attribute that provides the request method and relative URL. There are six built-in annotations: Get, Post, Put, Delete, Patch and Head. The relative URL of the resource is specified in the annotation. A request URL can be updated dynamically using replacement blocks and parameters on the method. A replacement block is an alphanumeric string surrounded by { and }. Parameters that are not specified as a URL substitution will automatically be used as query parameters. This is different than Retrofit, where all parameters must be explicitly specified. Round-tripping route parameter syntax: Forward slashes aren't encoded when using a double-asterisk (**) catch-all parameter syntax.

Features

  • An automatic type-safe REST library for .NET Core, Xamarin and .NET
  • Refit is a library heavily inspired by Square's Retrofit library
  • .NET Core supports registering via HttpClientFactory
  • Refit currently supports UWP, Xamarin.Android, Xamarin.Mac, Xamarin.iOS, and Desktop .NET 4.6.1
  • Refit 6 requires Visual Studio 16.8 or higher
  • It can target any .NET Standard 2.0 platform

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Refit

Refit Web Site

Other Useful Business Software
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Refit!

Additional Project Details

Operating Systems

Android, Apple iPhone, Mac

Programming Language

C#

Related Categories

C# Libraries

Registered

2021-11-03