Home Identifier Source Repository
import SirenLink from 'super-siren/lib/SirenLink.js'
public class | source

SirenLink

You can directly use instance of this class. sirenLink

Siren link used to describe navigation through a siren entity graph.

Constructor Summary

Public Constructor
public

constructor(rels: Array<String>, href: String)

Constructs a new SirenLink based on the provided rels and href values.

Method Summary

Public Methods
public

follow(): superagent-promise

Perhaps an HTTP Get against the href represented by this Link.

Public Constructors

public constructor(rels: Array<String>, href: String) source

Constructs a new SirenLink based on the provided rels and href values.

Params:

NameTypeAttributeDescription
rels Array<String>

array of rel values for this link

href String

URL that this link refers to.

Public Methods

public follow(): superagent-promise source

Perhaps an HTTP Get against the href represented by this Link.

Return:

superagent-promise

superagent request as a with a promise wrapper