@hydra-cg/heracles.ts > IHypermediaProcessor
Describes an abstract meta-data providing facility which translates from a raw {@link Response} to an abstract data model.
interface:
IHypermediaProcessor
● supportedMediaTypes: Iterable
<string
>
Defined in IHypermediaProcessor.ts:17
Gets supported media types.
readonly:
returns:
▸ process(response: Response
, client: IHydraClient, options?: IHypermediaProcessingOptions): Promise
<IWebResource>
Defined in IHypermediaProcessor.ts:33
Parses a given raw response.
Parameters:
Name | Type | Description |
---|---|---|
response | Response |
Raw fetch response holding data to be parsed. |
client | IHydraClient | Hydra client. |
Optional options |
IHypermediaProcessingOptions | Optional additional processing options. |
Returns: Promise
<IWebResource>
▸ supports(response: Response
): Level
Defined in IHypermediaProcessor.ts:24
Determines level of support of a this IHypermediaProcessor for given response.
Parameters:
Name | Type | Description |
---|---|---|
response | Response |
Response to check support for. |
Returns: Level