Link Header: Difference between revisions

From Delft Solutions
Jump to navigation Jump to search
No edit summary
 
Line 14: Line 14:
== Additional Properties ==
== Additional Properties ==
A link can have other optional properties as well, an example is the <code>templated=true</code> property that should be added if a client is supposed to fill in a [[URL Template]].
A link can have other optional properties as well, an example is the <code>templated=true</code> property that should be added if a client is supposed to fill in a [[URL Template]].
[[Category: Terminology]]

Latest revision as of 18:14, 18 January 2021

Link headers are a way to signal available actions to clients. Which actions can be available and how you can perform these actions are documented in the Media-Type specification corresponding to the Content-Type you got back from the server.

Links are identified using their `rel` parameter and always have a `href`.

Common Links

  • rel=self: This is the canonical URL for this resource. PUT and DELETE requests should generally be done here.
  • rel=next: The next page in a list
  • rel=prev: The previous page in a list
  • rel=first: The first page in a list
  • rel=last: The last page in a list

A full list of publicly registered relation types can be found on the IANA Link Relations page.

Additional Properties

A link can have other optional properties as well, an example is the templated=true property that should be added if a client is supposed to fill in a URL Template.