@abdulghani/axioshelper 中文文档教程
Axios helper function
基于 url 和配置创建 axios 实例
Usage
import { createInstance } from "@abdulghani/axioshelper";
const myInstance = createInstance({ url: "http://myapiaddress.com/", timeout: 5000 });
// usage
myInstance.get(
`endpoint1`,
{ page: 2 },
cancelToken
);
Axios helper function
to create axios instance based on url and config
Usage
import { createInstance } from "@abdulghani/axioshelper";
const myInstance = createInstance({ url: "http://myapiaddress.com/", timeout: 5000 });
// usage
myInstance.get(
`endpoint1`,
{ page: 2 },
cancelToken
);