From 46791999e11cfa01c06b731b03e26bb29c67d4b8 Mon Sep 17 00:00:00 2001 From: Sebastien Dubois Date: Tue, 23 Feb 2021 22:56:55 +0100 Subject: [PATCH] Import default Axios instance. fix #215. (#216) --- src/wrappers/request.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wrappers/request.js b/src/wrappers/request.js index cf140e6..2800a0e 100644 --- a/src/wrappers/request.js +++ b/src/wrappers/request.js @@ -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 = { @@ -34,7 +34,7 @@ export default function(options, cb) { } } - request(requestOptions) + axios.request(requestOptions) .then(response => cb(null, response)) .catch(err => cb(err)); }