@abdulghani/axioshelper

1.0.0 • Public • Published

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
  );

Package Sidebar

Install

npm i @abdulghani/axioshelper

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

1.8 kB

Total Files

4

Last publish

Collaborators

  • abdulghani