Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Replace request with axios #1466

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fisehara
Copy link
Contributor

@fisehara fisehara commented Oct 26, 2023

Drop in replacement for request with got is not possible, as got no proxy support has. Axios comes with proxy support and similar size of package as got.

Axios has no proxy+tunnel support and needs tunnel as HttpAgent. With this limitations, got could also be used.

Change-type: major

@fisehara fisehara marked this pull request as draft October 26, 2023 20:54
Copy link
Contributor

@Page- Page- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fisehara
Copy link
Contributor Author

fisehara commented Jan 2, 2024

@Page- Currently we won't be able to natively use 'got' sindresorhus/got#1789 as open-balena-api is using CommonJs.

Drop in replacement for `request` with `got` is not possible, as `got` no proxy support has. `Axios` comes with proxy support and similar size of package as `got`.

Change-type: major
Signed-off-by: Harald Fischer <harald@balena.io>
Signed-off-by: fisehara <harald@balena.io>
@fisehara fisehara force-pushed the fisehara/replace-request-with-axios branch from 969ff30 to 918afdd Compare January 2, 2024 17:35
@joshbwlng
Copy link
Contributor

Would it be better to wait until we can use got before switching to axios? I know there's been a lot of work to move us away from CommonJs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants