Constructor
new LinkHeaderExtension()
Create a new link header extension.
- Implements:
- Source:
Methods
applies(data, headers, context) → {Boolean}
Determine whether this extension should be used to process a particular response
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | The body of the response, pre-parsed if some form of JSON. |
headers |
Object.<string, string> | The HTTP headers of the response |
context |
Context | The context of the current resource/operation. |
- Implements:
- Source:
Returns:
True if the extension should be used to process the response.
- Type
- Boolean
linkParser(data, headers, context) → {Object.<String, LinkCollection>}
Parse any links found in the resources.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | The body of the response, pre-parsed if some form of JSON. |
headers |
Object.<string, string> | The HTTP headers of the response |
context |
Context | The context of the current resource/operation. |
- Implements:
- Source:
Returns:
The links, aggregated by the link relation.
- Type
- Object.<String, LinkCollection>