WebLinking.Integration.AspNetCore 1.0.0-beta

This is a prerelease version of WebLinking.Integration.AspNetCore.
There is a newer version of this package available.
See the version list below for details.
dotnet add package WebLinking.Integration.AspNetCore --version 1.0.0-beta                
NuGet\Install-Package WebLinking.Integration.AspNetCore -Version 1.0.0-beta                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WebLinking.Integration.AspNetCore" Version="1.0.0-beta" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WebLinking.Integration.AspNetCore --version 1.0.0-beta                
#r "nuget: WebLinking.Integration.AspNetCore, 1.0.0-beta"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install WebLinking.Integration.AspNetCore as a Cake Addin
#addin nuget:?package=WebLinking.Integration.AspNetCore&version=1.0.0-beta&prerelease

// Install WebLinking.Integration.AspNetCore as a Cake Tool
#tool nuget:?package=WebLinking.Integration.AspNetCore&version=1.0.0-beta&prerelease                

Web Linking for .NET

A .NET implementation of the Web Linking proposed standard RFC8288

NuGet netstandard 2.0 Coverage Status Build status

The RFC8288 is a specification that defines a model for the relationships between resources on the Web ("links") and the type of those relationships ("link relation types"). It also defines the serialisation of such links in HTTP headers with the Link header field.

This .NET Standard library is a strict implementation of this specification.


Getting Started

This implementation provides two .NET Standard 2.0 NuGet packages and a demo MVC application.

WebLinking.Core

The core implementation of the specification.
Provides Link header format definition and abstractions.

The bare minimum to support Link header in your .NET project.

package manager

Install-Package WebLinking.Core

dotnet cli

dotnet add package WebLinking.Core

WebLinking.Integration.AspNetCore

AspNet Core MVC integration layer and abstractions.

package manager

Install-Package WebLinking.Integration.AspNetCore

dotnet cli

dotnet add package WebLinking.Integration.AspNetCore

WebLinking.DemoApi

A sample project to demo how to integrate WebLinking into an AspNetCore Mvc application

What is Web Linking ?

Without being limited to that, Web Link is often seen as an API pagination mean.
It is a lightweight alternative to HATOAS, where pagination cursors are embedded in the resource representation. With Web Linking, pagination cursors are sent in the header of the HTTP response.

For example, Github API v3 uses Web Linking to express pagination cursors :

Link: <https://api.github.com/user/repos?page=3&per_page=100>; rel="next",
<https://api.github.com/user/repos?page=50&per_page=100>; rel="last"

API Clients don't need to implement link formatting, they just use links returned by the API. It makes them resilient to link format changes over time. The rel attribute defines the type of relation this link provides.

How Web Linking is different from HATOAS ?

Beside specifying the Link format, Web Linking also defines how links should be convey in the HTTP response.

In opposite to a more traditional HATOAS approach, where Links are conveyed inside the Resource representation, with Web Linking links are conveyed in a Link HTTP header.

This difference is subtle but it helps producing a lightweight Resource representation.
When you need to convey the Link in the response body, you need to wrap your Resource definition into a more verbose structure.

With Web Linking you can just return a pure Resource representation.

However, keep in mind that it is a the price of the developer experience. HTTP Headers are less discoverable than HTTP Response body (eg. Browser).

Web Linking in the industry

Who is using Web Linking ?

just to name of few...

Product 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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0 545 12/13/2022
2.0.0 299 12/10/2022
1.0.11 565 10/5/2020
1.0.1-beta 397 3/7/2019
1.0.0-beta 401 2/25/2019

1.0.0: Initial version