Blog Logo

Refit: The automatic type-safe REST library for .NET Core, Xamarin and .NET

Refit is a library heavily inspired by Squares Retrofit library, and it turns your REST API into a live interface. With RestService, Refit generates an implementation of your API that uses HttpClient to make its calls. Refit is compatible with .NET Core, Xamarin and .NET. This JSON structure provides information on Where it works, API Attributes, Dynamic Querystring Parameters, Collections as Querystring parameters, Unescape Querystring parameters, Body content including Buffering and the Content-Length header, JSON content, XML Content and Form posts. In addition, it describes how to set request headers, pass state into DelegatingHandlers, test your Refit API, work with Serialization and Deserialization, handle errors and retries, and how to use HTTP/2 and Compression to increase performance.