constructor(response: IRawResponse, collection?: IJsonapiCollection, options?: IRequestOptions, overrideData?: IJsonapiModel |Array<IJsonapiModel >)
Creates a new
Response object instance. It needs to receive at lest the raw response.
replaceData(data: IJsonapiModel): Response
Replace the response model with a different model. Used to replace a model while keeping the same reference. Mostly for internal use.
An model or an array of model received from the API
An error object received from the API
The JSON API version received from the API
Metadata received in the API response (not including the model or relationship meta data)
Links received in the API response. The link promises are exposed as properties of the
Response object. The promise will resolve to a different
Response object. The properties are lazy evaluated, so no requests will be done unless you access the property.
A Headers object returned from the API
A key/value object with custom headers sent to the server in the API call
HTTP response status