I tried hundreds of times and to use proxy with axios and its not work
Can anyone explain whats the problem please
Im gonna to drop a simple code explaining the problem
const axios = require('axios');
// Make the GET request with Axios and the proxy agent
axios.get('https://ip.smartproxy.com', {
proxy: {
host: '185.122.168.215',
port: 34991
// no need to user and password cuz i already in the whitelist
// i tryied free proxy and its not work
}
})
.then(response => {
console.log('Response:', response.data);
})
.catch(error => {
console.error('Error:', error);
});
I really tried everything and I dont know what could to do
the output is : cause: Error: write EPROTO B4370000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:c:wsdepsopensslopensslsslrecordssl3_record.c:355:
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16) {
errno: -4046,
code: 'EPROTO',
syscall: 'write'
}
}
output img
New contributor
Test 0oczi_ Uıu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.