Response

API requests return a Response object. This is responsible for carrying and handling the response body and ultimately executing actions such as persisting data to the store.

Instance Properties

response

  • Type: Object
    The axios response schema. Please refer to the axios documentation for more details.

entities

isSaved

  • Type: boolean
    Set to true when response data has persisted to the store.

model

  • Type: typeof Model
    The model class that initially made the request.

config

  • Type: Object
    The configuration which was passed to the Request instance.

Instance Methods

save

delete

  • delete(): Promise<void>
    Delete record from the store after a request has completed. This method relies on the delete option and will throw an error if it is not set.
    See also: Delete Requests