-
Notifications
You must be signed in to change notification settings - Fork 4
Response
constructor(response: IRawResponse, store: Store, options?: IRequestOptions, overrideData?: IModel|Array<IModel>)Creates a new Response object instance. It needs to receive at lest the raw response and the store instance.
replaceData(data: IModel): ResponseReplace the response record with a different record. Used to replace a record while keeping the same reference. Mostly for internal use.
An record or an array of records 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 record 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