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
- Type:
Array | null
The return value from the Pinia ORM persist method.
See also: Configurations - save
isSaved
- Type:
boolean
Set totrue
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
save(): Promise<void>
Save response data to the store.
See also: Deferring Persistence
delete
delete(): Promise<void>
Delete record from the store after a request has completed. This method relies on thedelete
option and will throw an error if it is not set.
See also: Delete Requests