Skip to content

feat: make impit the default HTTP client#3767

Open
barjin wants to merge 1 commit into
v4from
feat/make-impit-default
Open

feat: make impit the default HTTP client#3767
barjin wants to merge 1 commit into
v4from
feat/make-impit-default

Conversation

@barjin

@barjin barjin commented Jun 19, 2026

Copy link
Copy Markdown
Member

Makes @crawlee/impit-client the default HTTP client for @crawlee/basic's BasicCrawler.

@barjin barjin self-assigned this Jun 19, 2026
@barjin barjin added the adhoc Ad-hoc unplanned task added during the sprint. label Jun 19, 2026
@barjin barjin requested a review from janbuchar June 19, 2026 12:05
@janbuchar

Copy link
Copy Markdown
Contributor

This makes @crawlee/basic depend on the native extensions, which restricts the supported architectures. Is that OK? I remember we discussed making impit an optional dependency and falling back to native fetch + a warning.

@barjin

barjin commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

Blocked by apify/impit#487

@barjin

barjin commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

I remember we discussed making impit an optional dependency and falling back to native fetch + a warning.

Huh, I don't recall that, but it doesn't sound bad. Do you mean something like a dynamic impit import in try { } and FetchHttpClient being the catch {} branch?

@janbuchar

Copy link
Copy Markdown
Contributor

I remember we discussed making impit an optional dependency and falling back to native fetch + a warning.

Huh, I don't recall that, but it doesn't sound bad. Do you mean something like a dynamic impit import in try { } and FetchHttpClient being the catch {} branch?

Yes, that's the general idea

@B4nan

B4nan commented Jun 19, 2026

Copy link
Copy Markdown
Member

I don't remember that either, but it makes sense for sure. I would include the impit client in crawlee package, so it just works, but if you want to go with the crawler packages, it makes sense to install it explicitly. I can imagine it won't be often necessary for browser crawlers too.

@janbuchar janbuchar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So the general consensus seems to be that we should gracefully handle the case when impit is not installed. Please re-request me once that's done 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants