We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to use a proxy with a ca cert but always throws an error
This is working fine with superagent and got, but Axios does not seem to work.
Reopening this issue, as it was also reported in #4963 but the issue was closed without resolution.
No response
const axios_options = { maxRedirects: 0, //no followRedirect headers: options.headers, url: options.url, method: options.method, timeout: options.timeout || 2000 }; if (options.params) { axios_options.params = options.params; } if (options.form) { const formData = options.form; axios_options.data = new url.URLSearchParams(formData).toString(); } if (options.https) { axios_options.httpsAgent = new https.Agent({ cert: options.https.certificate, key: options.https.key }); } HERE you can change all axios configs to add proxy, etc axios_options.proxy = { protocol: 'http', host: 'proxy.com', port: 8886, auth: { username: 'xyz', password: 'abcd' } } try { const result = await axios(axios_options); const json = result.data; } catch (e) { }
1.6.5
Node 20
The text was updated successfully, but these errors were encountered:
Same here. Works with superagent
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Describe the issue
I'm trying to use a proxy with a ca cert but always throws an error
This is working fine with superagent and got, but Axios does not seem to work.
Reopening this issue, as it was also reported in #4963 but the issue was closed without resolution.
To Reproduce
No response
Code snippet
Expected behaviour
No response
Axios Version
1.6.5
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
Node 20
OS
No response
Additional Library Versions
No response
Additional context/Screenshots
No response
The text was updated successfully, but these errors were encountered: