Pinia ORM Axios adds supporting properties and methods to the Model object.

Static Properties


  • Type: AxiosInstance | null
    The axios instance which was either set during plugin installation or set using the setAxios method. Pinia ORM Axios will use this axios instance to perform requests.


  • Type: Object
  • Default: {}
    The property that holds the model configuration for requests.


  • Type: Object
    The property that holds the global configuration. The value will be set automatically during the plugin installation process.

::: warning WARNING Do not mutate this property programmatically. :::

Static Methods


  • api(): Request
    Return a newly created Request instance.


  • setAxios(axios: AxiosInstance): void
    Set the axios instance manually. Typical setups will configure the axios instance during installation. However, in some cases (mostly with Nuxt), you may need to set the axios instance at a later stage.
    ::: warning IMPORTANT If you omit the axios instance during installation, it's important that one is set using setAxios before any attempt to make an API request. :::
    See also: Nuxt.js Integration