Finished: false
TIP
available in add-on @vueuse/integrations
useAxios
wrapper for
axios
Install
npm i axios
Usage
import { useAxios } from '@vueuse/integrations'
const { data, finished } = useAxios('/api/posts')
Type Declarations
/**
* Wrapper for axios.
*
* @see {@link /useAxios}
* @param url
* @param config
*/
export declare function useAxios<T = any>(
url: string,
config?: AxiosRequestConfig
): {
response: Ref<AxiosResponse<T> | undefined>
data: Ref<T | undefined>
error: Ref<AxiosError<T> | undefined>
finished: Ref<boolean>
cancel: (message?: string | undefined) => void
canceled: Ref<boolean>
}