Skip to content

Commit

Permalink
Import default Axios instance. fix #215. (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsebastien committed Feb 23, 2021
1 parent beb5761 commit 4679199
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wrappers/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import https from 'https';
import url from 'url';
import httpProxyAgent from 'http-proxy-agent';
import httpsProxyAgent from 'https-proxy-agent';
import { request } from 'axios';
import { getProxyForUrl } from 'proxy-from-env';
const axios = require('axios').default;

export default function(options, cb) {
const requestOptions = {
Expand Down Expand Up @@ -34,7 +34,7 @@ export default function(options, cb) {
}
}

request(requestOptions)
axios.request(requestOptions)
.then(response => cb(null, response))
.catch(err => cb(err));
}

0 comments on commit 4679199

Please sign in to comment.