![]() |
VOOZH | about |
dotnet add package TypedRest --version 1.6.5
NuGet\Install-Package TypedRest -Version 1.6.5
<PackageReference Include="TypedRest" Version="1.6.5" />
<PackageVersion Include="TypedRest" Version="1.6.5" />Directory.Packages.props
<PackageReference Include="TypedRest" />Project file
paket add TypedRest --version 1.6.5
#r "nuget: TypedRest, 1.6.5"
#:package TypedRest@1.6.5
#addin nuget:?package=TypedRest&version=1.6.5Install as a Cake Addin
#tool nuget:?package=TypedRest&version=1.6.5Install as a Cake Tool
👁 Build
👁 API 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 setup guide.
You can also take a look at our Sample project.
👁 TypedRest
The main TypedRest library.
👁 TypedRest.Reactive
Adds support for streaming with ReactiveX (Rx).
Create endpoints using the types in the TypedRest.Endpoints.Reactive namespace.
👁 TypedRest.SystemTextJson
Adds support for serializing using System.Text.Json instead of Newtonsoft.Json.
Pass new SystemTextJsonSerializer() to the EntryEndpoint constructor.
👁 TypedRest.OAuth
Adds support for OAuth 2.0 / OpenID Connect authentication to HttpClient.
Call .AddOAuthHandler() after .AddTypedRest() (or .AddHttpClient() when not using main TypedRest package).
👁 TypedRest.CommandLine
Build command-line interfaces for TypedRest clients.
Create commands mirroring the endpoints using the types in the TypedRest.CommandLine.Commands namespace.
The source code is in , config for building the API documentation is in and generated build artifacts are placed in artifacts/. The source code does not contain version numbers. Instead the version is determined during CI using GitVersion.
To build run .\build.ps1 or ./build.sh (.NET SDK is automatically downloaded if missing using 0install).
We welcome contributions to this project such as bug reports, recommendations and pull requests.
This repository contains an EditorConfig file. Please make sure to use an editor that supports it to ensure consistent code style, file encoding, etc.. For full tooling support for all style and naming conventions consider using JetBrains' ReSharper or Rider products.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 3 NuGet packages that depend on TypedRest:
| Package | Downloads |
|---|---|
|
PowerDns.Client
Client library for the PowerDNS API |
|
|
TypedRest.Reactive
Adds support for streaming with ReactiveX (Rx) to TypedRest. Create endpoints using the types in the TypedRest.Endpoints.Reactive namespace. |
|
|
TypedRest.SystemTextJson
Adds support for serializing using System.Text.Json to TypedRest. Pass new SystemTextJsonSerializer() to the EntryEndpoint constructor. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.6.5 | 283 | 5/17/2026 |
| 1.6.4 | 258 | 5/2/2026 |
| 1.6.3 | 401 | 2/15/2026 |
| 1.6.2 | 407 | 12/20/2025 |
| 1.6.1 | 496 | 9/8/2025 |
| 1.6.0 | 946 | 12/15/2024 |
| 1.5.4 | 779 | 9/8/2024 |
| 1.5.3 | 549 | 7/7/2024 |
| 1.5.2 | 1,323 | 12/27/2023 |
| 1.5.1 | 970 | 10/4/2023 |
| 1.5.0 | 457 | 10/3/2023 |
| 1.4.1 | 416 | 10/1/2023 |
| 1.4.0 | 422 | 9/30/2023 |
| 1.3.8 | 12,918 | 3/12/2023 |
| 1.3.7 | 1,738 | 11/28/2022 |
| 1.3.6 | 3,328 | 11/29/2021 |
| 1.3.5 | 1,268 | 9/5/2021 |
| 1.3.4 | 1,581 | 1/29/2021 |
| 1.3.3 | 13,315 | 11/30/2020 |
| 1.3.2 | 1,086 | 11/27/2020 |