79462124

Date: 2025-02-23 23:02:16
Score: 0.5
Natty:
Report link

The issue lies in axios, i didnt know, what axios has sometimes problems using a http Proxys with https:// requests. A good workaround is found here at github:

https://github.com/axios/axios/issues/4531#issuecomment-1081264893

const axios = require('axios');
const { HttpProxyAgent, HttpsProxyAgent } = require('hpagent')

const httpAgent = new HttpProxyAgent({
    proxy: 'proxy url'
})
const httpsAgent = new HttpsProxyAgent({
    proxy: 'proxy url'
})

const instance = axios.create({ httpAgent, httpsAgent });

instance.post('http://example.com')
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: UsAA12