axios-fetcher
Gettin started
- Install the package
npm i axios-fetcher
- 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: