This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//save the adapter code as httpWithProxyAdapter.js in the project | |
// configure Axios to use our new adapter for all the new request. | |
const axios = require('axios'); | |
const httpWithProxyAdapter = require('./lib/adapters/httpWithProxyAdapter'); | |
// enable for all requests | |
axios.defaults.adapter = httpWithProxyAdapter; |