DataHenHQ/till

Doesn't work with node

beaugunderson opened this issue · 1 comments

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.

Thanks for raising this issue, after further investigation, I was able to verify and reproduce this issue, and created issue #6 .
The fix is already deployed on the newest Till version ( v0.8.1 ).
I'm closing this issue now, let me know if you face anymore problems.