@vt7/fetch
v6.0.0
Published
This is a wrapper axios plugin
Downloads
28
Readme
@vt7/fetch
The @vt7/fetch
package is a wrapper of the Axios package, it contains functions that make it easier to work with axios and easier to debug and cancel.
Usage
Install package:
# npm
npm install @vt7/fetch
# yarn
yarn add @vt7/fetch
# pnpm
pnpm install @vt7/fetch
# bun
bun install @vt7/fetch
Import:
// ESM
import { createFetch, createAxiosExtra, createAxiosDebug } from "@vt7/fetch";
const fetcher = createFetch({
debug: true,
debugError: true,
baseUrl: 'https://api.example.com',
// options axios
})
fetcher.$get('/api/lorem') // return response.data
License
Made with 💛
Published under MIT License.