npm.io
7.0.1 • Published 7 months ago

@vt7/fetch

Licence
MIT
Version
7.0.1
Deps
2
Size
28 kB
Vulns
0
Weekly
0
Stars
1

@vt7/fetch

npm version npm downloads bundle Codecov

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.