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

HTTP client switching #2659

Open
B4nan opened this issue Sep 4, 2024 · 4 comments · May be fixed by #2661
Open

HTTP client switching #2659

B4nan opened this issue Sep 4, 2024 · 4 comments · May be fixed by #2661
Assignees
Labels
t-tooling Issues with this label are in the ownership of the tooling team.

Comments

@B4nan
Copy link
Member

B4nan commented Sep 4, 2024

Currently, we use got-scraping for making HTTP calls, but that is getting outdated as we speak. We need to find a way to allow using different HTTP clients, like curl-impersonate or axios.

@B4nan B4nan added the t-tooling Issues with this label are in the ownership of the tooling team. label Sep 4, 2024
@janbuchar
Copy link
Contributor

janbuchar commented Sep 4, 2024

The interface should mimic that of got-scraping for BC reasons (https://github.com/sindresorhus/got/blob/main/documentation/2-options.md#url), with features not supported by https://github.com/apify-projects/node-curl-impersonate/tree/master omitted. Index signatures will be used to keep compatibility with eccentric usage of got-scraping.

@vladfrangu
Copy link
Member

Shouldn't we just do this in a breaking change instead? Feels weird to try and make it still respect got-scrapings interface to me...

@janbuchar
Copy link
Contributor

janbuchar commented Sep 4, 2024

Shouldn't we just do this in a breaking change instead? Feels weird to try and make it still respect got-scrapings interface to me...

It doesn't seem like that much of a hassle. But if it is, I'm totally open to just breaking it. Wait for the PR 🙂

@B4nan
Copy link
Member Author

B4nan commented Sep 4, 2024

We will most likely do that later this year, but the support for doing this "somehow" should be done during Q3, so let's try to make it work now on runtime at the cost of not perfect typing, and improve in v4 where we can afford breaking stuff.

@janbuchar janbuchar linked a pull request Sep 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants