TypedRest 1.3.8
dotnet add package TypedRest --version 1.3.8
NuGet\Install-Package TypedRest -Version 1.3.8
<PackageReference Include="TypedRest" Version="1.3.8" />
paket add TypedRest --version 1.3.8
#r "nuget: TypedRest, 1.3.8"
// Install TypedRest as a Cake Addin
#addin nuget:?package=TypedRest&version=1.3.8
// Install TypedRest as a Cake Tool
#tool nuget:?package=TypedRest&version=1.3.8
for .NET
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.
You can also take a look at our Sample project.
NuGet packages
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.
Building
The source code is in src/
, config for building the API documentation is in doc/
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).
Contributing
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 |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
.NET Core | netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard2.0 netstandard2.1 |
.NET Framework | net461 net462 net463 net47 net471 net472 net48 net481 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen40 tizen60 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.NETStandard 2.0
- Microsoft.AspNet.WebApi.Client (>= 5.2.9)
- Microsoft.AspNetCore.JsonPatch (>= 6.0.14)
- Microsoft.Extensions.Http (>= 6.0.0)
- MorseCode.ITask (>= 2.0.3)
- Newtonsoft.Json (>= 13.0.3)
- Resta.UriTemplates (>= 1.4.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Diagnostics.DiagnosticSource (>= 7.0.1)
- System.ValueTuple (>= 4.5.0)
-
.NETStandard 2.1
- Microsoft.AspNet.WebApi.Client (>= 5.2.9)
- Microsoft.AspNetCore.JsonPatch (>= 6.0.14)
- Microsoft.Extensions.Http (>= 6.0.0)
- MorseCode.ITask (>= 2.0.3)
- Newtonsoft.Json (>= 13.0.3)
- Resta.UriTemplates (>= 1.4.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Diagnostics.DiagnosticSource (>= 7.0.1)
-
net6.0
- Microsoft.AspNet.WebApi.Client (>= 5.2.9)
- Microsoft.AspNetCore.JsonPatch (>= 6.0.14)
- Microsoft.Extensions.Http (>= 6.0.0)
- MorseCode.ITask (>= 2.0.3)
- Newtonsoft.Json (>= 13.0.3)
- Resta.UriTemplates (>= 1.4.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Diagnostics.DiagnosticSource (>= 7.0.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on TypedRest:
Package | Downloads |
---|---|
TypedRest.Reactive
Adds support for streaming with ReactiveX (Rx) to TypedRest. |
|
PowerDns.Client
Client library for the PowerDNS API |
|
TypedRest.JsonPatch
Adds support for JSON Patch to TypedRest. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.3.8 | 217 | 3/12/2023 |
1.3.7 | 756 | 11/28/2022 |
1.3.6 | 2,419 | 11/29/2021 |
1.3.5 | 708 | 9/5/2021 |
1.3.4 | 1,001 | 1/29/2021 |
1.3.3 | 3,561 | 11/30/2020 |
1.3.2 | 588 | 11/27/2020 |
1.3.1 | 652 | 11/20/2020 |
1.3.0 | 1,297 | 9/20/2020 |
1.2.1 | 658 | 9/14/2020 |
1.2.0 | 662 | 8/26/2020 |
1.1.0 | 1,092 | 5/28/2020 |
1.1.0-rc0001 | 393 | 5/12/2020 |
1.0.3 | 1,726 | 3/23/2020 |
1.0.2 | 1,034 | 3/6/2020 |
1.0.1 | 904 | 3/6/2020 |
1.0.0 | 6,288 | 12/11/2019 |
1.0.0-rc0001 | 505 | 9/26/2019 |
0.43.0 | 3,994 | 1/8/2019 |
0.42.0 | 863 | 12/11/2018 |
0.41.0 | 1,427 | 10/23/2018 |
0.40.0 | 1,316 | 10/10/2018 |
0.39.0 | 1,222 | 9/13/2018 |
0.38.2 | 1,080 | 8/21/2018 |
0.38.1 | 1,220 | 3/28/2018 |
0.38.0 | 1,215 | 3/28/2018 |
0.37.0 | 1,244 | 3/13/2018 |
0.36.0 | 1,192 | 9/14/2017 |
0.35.0 | 1,279 | 5/12/2017 |
0.34.0 | 1,213 | 12/13/2016 |
0.33.0 | 1,233 | 11/23/2016 |
0.32.0 | 1,205 | 11/9/2016 |
0.31.0 | 1,204 | 10/18/2016 |
0.30.0 | 1,183 | 10/11/2016 |
0.29.1 | 1,186 | 9/5/2016 |
0.29.0 | 1,226 | 9/5/2016 |
0.28.0 | 1,435 | 7/11/2016 |
0.27.0 | 1,207 | 6/21/2016 |
0.26.0 | 1,594 | 6/15/2016 |
0.25.0 | 1,211 | 6/2/2016 |
0.24.0 | 1,227 | 5/30/2016 |
0.23.0 | 1,167 | 5/25/2016 |
0.22.0 | 1,155 | 5/9/2016 |
0.21.0 | 1,211 | 5/3/2016 |
0.20.0 | 1,200 | 5/2/2016 |
0.19.0 | 1,199 | 4/29/2016 |
0.18.0 | 1,460 | 4/27/2016 |
0.17.0 | 1,230 | 4/14/2016 |
0.16.0 | 1,199 | 4/7/2016 |
0.15.0 | 1,161 | 3/18/2016 |
0.14.0 | 1,547 | 2/27/2016 |
0.13.0 | 1,232 | 2/4/2016 |
0.12.0 | 1,197 | 1/25/2016 |
0.11.0 | 1,298 | 1/18/2016 |
0.10.0 | 1,306 | 1/7/2016 |
0.9.0 | 1,199 | 12/17/2015 |
0.8.0 | 1,221 | 12/10/2015 |
0.7.0 | 1,274 | 10/29/2015 |
0.6.0 | 1,059 | 10/23/2015 |
0.5.0 | 1,077 | 10/21/2015 |
0.4.0 | 1,103 | 10/16/2015 |
0.3.0 | 1,086 | 10/15/2015 |
0.2.0 | 1,068 | 10/12/2015 |
0.1.0 | 1,576 | 9/25/2015 |