@abdulghani/axioshelper

small function helps to setup axios instance

Usage no npm install needed!

<script type="module">
  import abdulghaniAxioshelper from 'https://cdn.skypack.dev/@abdulghani/axioshelper';
</script>

README

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