Created
July 12, 2019 06:11
-
-
Save lxneng/9419db0c479e89793da0dd4ef9edc37e to your computer and use it in GitHub Desktop.
axios over https proxy agent
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
const axios = require('axios'); | |
const httpsProxyAgent = require('https-proxy-agent'); | |
axios({ | |
url: 'https://mp.weixin.qq.com/s?__biz=MjM5MjA5NTk0MA==&mid=2652614878&idx=1&sn=2f04cadcc65d38767f8b549f454c895e&chksm=bd449b758a3312631e1eb6a02f9c285b8b90871a18bd7f28c7cfc17bd820d8dbdc06b9669cfa&scene=27#wechat_redirect', | |
httpsAgent: new httpsProxyAgent('http://61.128.208.94:3128') | |
}).then((res) => { | |
console.log(res.data); | |
}).catch((err) => { | |
console.log(err); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment