1.0.2 • Published 6 months ago

@ip-pilot/axios-fetcher v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

axios-fetcher

Gettin started

  1. Install the package
npm i axios-fetcher
  1. How to use it in your file (ex: paste it in an index.js file and then run node index.js):
const { axiosFetcher } = require('axios-fetcher');

const asyncFunction = async () => {
  const yourToken = '........';
  const requestOptions = {
    url: 'your url',
    method: 'POST',
    headers: { 'content-type': 'application/json', Authorization: `Bearer ${yourToken}` },
    data: raw,
    redirect: 'follow',
  };

  const response = await axiosFetcher(requestOptions);
};

asyncFunction();

Built with

Company

IP Pilot: