SlySoft.RestResource
1.0.0.15-Beta
See the version list below for details.
dotnet add package SlySoft.RestResource --version 1.0.0.15-Beta
NuGet\Install-Package SlySoft.RestResource -Version 1.0.0.15-Beta
<PackageReference Include="SlySoft.RestResource" Version="1.0.0.15-Beta" />
paket add SlySoft.RestResource --version 1.0.0.15-Beta
#r "nuget: SlySoft.RestResource, 1.0.0.15-Beta"
// Install SlySoft.RestResource as a Cake Addin #addin nuget:?package=SlySoft.RestResource&version=1.0.0.15-Beta&prerelease // Install SlySoft.RestResource as a Cake Tool #tool nuget:?package=SlySoft.RestResource&version=1.0.0.15-Beta&prerelease
RestResource
Utility for creating representing resources containing data, links, and embedded resources. A tool for creating HATEOAS web services.
Getting started
Install from Nuget.Org, and create a Resource() class. Use the extension methods .Data(), .Embedded() .Get(), .Query(), Post(), Put(), Patch(), and Delete() to add data and links to the resource.
Prerequisites
No prerequisites are required; however, to get maximum benifits use SlySoft.RestResource.Hal, and SlySoft.RestResource.Html to serialize and deserialize resources. SlySoft.RestResource.AspNetCoreUtils contains utilities for returning Resources from controller methods, respected the Accept header for serialization SlySoft.RestResource.Client contains utilities for communicating with web services created using RestResource
Usage
Example code (from an ASP.NET CORE MVC Controller):
[HttpGet]
public IActionResult Get() {
var resource = new Resource()
.Data("message", "Hello World!")
.Get("getUser", "/user")
.Post("addUser", "/user")
.Field("userName")
.Field("lastName")
.Field("firstName")
.Field("email")
.EndBody();
return StatusCode(200, resource);
}
Find more examples of how to use RestResource at my blog.
Additional documentation
More comprehensive documentation is also at my blog.
Feedback
Contact me for questions, issuess, or collaboration at sylvesterjj@gmail.com
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Text.Json (>= 8.0.5)
-
net8.0
- System.Text.Json (>= 8.0.5)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on SlySoft.RestResource:
Package | Downloads |
---|---|
SlySoft.RestResource.Html
Package Description |
|
SlySoft.RestResource.Serializers
Package Description |
|
Slysoft.RestResource.HalXml
Package Description |
|
Slysoft.RestResource.HalJson
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0.19-Beta | 39 | 11/27/2024 |
1.0.0.18-Beta | 65 | 11/22/2024 |
1.0.0.15-Beta | 88 | 11/1/2024 |
1.0.0.14-Beta | 39 | 11/1/2024 |
1.0.0.13-Beta | 37 | 11/1/2024 |
1.0.0.12-Beta | 37 | 11/1/2024 |
1.0.0.11-Beta | 58 | 10/28/2024 |
1.0.0.9-Beta | 70 | 10/19/2024 |
1.0.0.8-Beta | 95 | 10/9/2024 |
1.0.0-Beta | 101 | 7/12/2023 |
This is a beta version.