Heracles.ts

@hydra-cg/heracles.ts > IHypermediaProcessor

Interface: IHypermediaProcessor

Describes an abstract meta-data providing facility which translates from a raw {@link Response} to an abstract data model.

interface:

Hierarchy

IHypermediaProcessor

Implemented by

Index

Properties

Methods


Properties

supportedMediaTypes

● supportedMediaTypes: Iterable<string>

Defined in IHypermediaProcessor.ts:17

Gets supported media types.

readonly:

returns:


Methods

process

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

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