@vt7/fetch
TypeScript icon, indicating that this package has built-in type declarations

6.0.0 • Public • Published

@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.

/@vt7/fetch/

    Package Sidebar

    Install

    npm i @vt7/fetch

    Weekly Downloads

    21

    Version

    6.0.0

    License

    MIT

    Unpacked Size

    27.1 kB

    Total Files

    9

    Last publish

    Collaborators

    • vt7