TypedRest for .NET  1.3.4
build type-safe fluent-style REST API clients
TypedRest for .NET Documentation

TypedRest helps you build type-safe, fluent-style REST API clients. Common REST patterns such as collections are represented as classes, allowing you to write more idiomatic code.

var client = new MyClient(new Uri("http://example.com/"));
// GET /contacts
List<Contact> contactList = await client.Contacts.ReadAllAsync();
// POST /contacts -> Location: /contacts/1337
ContactEndpoint smith = await client.Contacts.CreateAsync(new Contact {Name = "Smith"});
//ContactEndpoint smith = client.Contacts["1337"];
// GET /contacts/1337
Contact contact = await smith.ReadAsync();
// PUT /contacts/1337/note
await smith.Note.SetAsync(new Note {Content = "some note"});
// GET /contacts/1337/note
Note note = await smith.Note.ReadAsync();
// DELETE /contacts/1337
await smith.DeleteAsync();

Read a more detailed Introduction to TypedRest or jump right in with the Getting started guide.

Take a look at the TypedRest.Endpoints namespace to get an overview of the available functionality.

GitHub repository

NuGet packages

The main TypedRest library.

Adds support for streaming with ReactiveX (Rx) to TypedRest.

Provides an HttpClient DelegatingHandler for OAuth 2.0 / OpenID Connect authentication.
This can also be used independently of the other TypedRest packages.

Build command-line interfaces for TypedRest clients.