tldr-node-client
tldr-node-client copied to clipboard
fix: Update command does not work with proxy
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
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.
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.