tldr-node-client icon indicating copy to clipboard operation
tldr-node-client copied to clipboard

fix: Update command does not work with proxy

Open code2933 opened this issue 1 year ago • 2 comments

Description

This PR fixed the problem that command tldr --update does not work with proxy. These unresolved issues originate from the same reason:

  • #378
  • #340
  • #326

It's a bug from axios that axios does not support HTTPS over HTTP proxy https://github.com/axios/axios/pull/5037 (a dead PR).

This PR replaces axios with node-fetch with tiny changes.

Checklist

Please review this checklist before submitting a pull request.

  • [x] Code compiles correctly
  • [x] Created tests, if possible
  • [x] All tests passing (npm run test:all)
  • [x] Extended the README / documentation, if necessary

code2933 avatar Oct 20 '23 05:10 code2933

Hi @code2933, could you please rebase your PR on the latest main?

Working on it. Seems I did a wrong action. I will create a new PR when it's finished.

code2933 avatar Oct 25 '23 06:10 code2933

Hey, I have merged previous commits and reopen this PR.

I have to note that I did not realize request timeout functionality which was introduced in PR #420 (see code here), since it's not a main feature from that PR, and I do not really know its necessity. I'm willing to add this functionality back if I'm wrong.

code2933 avatar Oct 26 '23 08:10 code2933