Doesn't work with node
beaugunderson opened this issue · 1 comments
beaugunderson commented
Works with curl but doesn't work with node:
const got = require('got');
const {HttpsProxyAgent} = require('hpagent');
(async function main() {
const response = await got.post('https://example.com/', {
agent: {
https: new HttpsProxyAgent({
proxy: 'http://localhost:2933',
}),
},
https: {
rejectUnauthorized: false,
},
json: { query },
});
console.log({ response });
})();I tried with http.request and request.post as well; no joy; I get ECONNRESET every time.