StacLink interface

Properties

body

For POST requests, the resource can specify the HTTP body as a JSON object.

headers

Object key-value pairs that map to headers. Example: { "Accept": "application/json" }.

href

The URL of the link.

hreflang

The language of the linked resource.

length

The length of the linked resource.

merge

Indicates whether the client is expected to merge the body value into the current request body before following the link. This is only valid when the server is responding to a POST request. Default: false.

method

Specifies the HTTP method that the resource expects. Default: GET.

rel

The relationship type of the link.

title

The title of the link.

type

The MIME type of the linked resource.

Property Details

For POST requests, the resource can specify the HTTP body as a JSON object.

body?: Record<string, any>

Property Value

Record<string, any>

Object key-value pairs that map to headers. Example: { "Accept": "application/json" }.

headers?: Record<string, string>

Property Value

Record<string, string>

The URL of the link.

href: string

Property Value

string

The language of the linked resource.

hreflang?: string

Property Value

string

The length of the linked resource.

length?: number

Property Value

number

Indicates whether the client is expected to merge the body value into the current request body before following the link. This is only valid when the server is responding to a POST request. Default: false.

merge?: boolean

Property Value

boolean

Specifies the HTTP method that the resource expects. Default: GET.

method?: string

Property Value

string

The relationship type of the link.

rel?: string

Property Value

string

The title of the link.

title?: string

Property Value

string

The MIME type of the linked resource.

type?: string

Property Value

string