Skip to content

fix: enable full cookie support for ImpitHttpClient #2991

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

barjin
Copy link
Contributor

@barjin barjin commented May 29, 2025

Runs the HttpCrawler tests with both HttpClient implementations (GotScrapingHttpClient, ImpitHttpClient).

Improves cookie store integration for ImpitHttpClient.

@barjin barjin requested a review from Copilot May 29, 2025 14:13
@barjin barjin self-assigned this May 29, 2025
@barjin barjin added the adhoc Ad-hoc unplanned task added during the sprint. label May 29, 2025
@github-actions github-actions bot added this to the 115th sprint - Tooling team milestone May 29, 2025
@github-actions github-actions bot added t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics. labels May 29, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes cookie support for ImpitHttpClient and extends the HttpCrawler tests to run with both GotScrapingHttpClient and ImpitHttpClient.

  • Updated tests to include both HTTP client implementations.
  • Modified ImpitHttpClient to cache both the client and its associated cookie jar based on request options.
  • Added a dependency on tough-cookie to support cookie jar functionality.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

File Description
test/core/crawlers/http_crawler.test.ts Added tests to run HttpCrawler with two different HTTP client options.
packages/impit-client/src/index.ts Updated client cache to include cookieJar, and adjusted client retrieval logic.
packages/impit-client/package.json Updated dependencies to include tough-cookie.
packages/http-crawler/src/internals/http-crawler.ts Propagated cookieJar from session to handle cookies in HTTP requests.

@barjin barjin marked this pull request as ready for review May 30, 2025 08:42
@barjin barjin requested review from janbuchar and B4nan May 30, 2025 10:23
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. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant