Skip to content

feat: Add HTTPX-based HTTP client - #1004

Draft
vdusek wants to merge 2 commits into
masterfrom
add-httpx-client
Draft

feat: Add HTTPX-based HTTP client#1004
vdusek wants to merge 2 commits into
masterfrom
add-httpx-client

Conversation

@vdusek

@vdusek vdusek commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Adds HttpxHttpClient / HttpxHttpClientAsync as built-in alternatives to the default Impit transport, behind an optional extra: pip install "apify-client[httpx]". Impit stays the default.

Stacked on #1022, whose shared request pipeline the adapters plug into: they implement only the transport hooks (send_request, is_retryable_transport_error, is_timeout_error, close() / aclose()) and apply the same retry policy as Impit — every error from the library's own hierarchy is transient except the permanently-failing types. A response event hook keeps HTTPX's shared cookie jar from leaking server cookies into later API requests. Unit tests run the built-in client matrix (Impit + HTTPX) through the parametrized fixtures.

Stack: #1022 (pipeline) → #1004 (this)#1013 (docs).

✍️ Drafted by Claude Code

@vdusek vdusek self-assigned this Aug 11, 2026
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Aug 11, 2026
@github-actions github-actions Bot added this to the 147th sprint - Tooling team milestone Aug 11, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Aug 11, 2026
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.43750% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.97%. Comparing base (35309d5) to head (2760925).

Files with missing lines Patch % Lines
src/apify_client/http_clients/__init__.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@                       Coverage Diff                       @@
##           unify-http-request-pipeline    #1004      +/-   ##
===============================================================
+ Coverage                        94.93%   94.97%   +0.04%     
===============================================================
  Files                               58       59       +1     
  Lines                             5406     5469      +63     
===============================================================
+ Hits                              5132     5194      +62     
- Misses                             274      275       +1     
Flag Coverage Δ
integration 91.97% <90.62%> (+0.44%) ⬆️
unit 85.44% <98.43%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek changed the title feat: add httpx http client [test] feat: Add HTTPX-based HTTP client Aug 19, 2026
@vdusek
vdusek changed the base branch from master to unify-http-request-pipeline August 19, 2026 06:56
@vdusek
vdusek marked this pull request as ready for review August 19, 2026 07:07
@vdusek
vdusek marked this pull request as draft August 19, 2026 07:46
Base automatically changed from unify-http-request-pipeline to master August 19, 2026 12:43
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.

2 participants