npm.io
1.0.2 • Published 3 years ago

axios-fetcher

Licence
ISC
Version
1.0.2
Deps
1
Size
2 kB
Vulns
0
Weekly
0

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:

Keywords