Skip to content

feat: Add HTTPX-based HTTP client - #1004

Draft
vdusek wants to merge 1 commit into
masterfrom
add-httpx-client
Draft

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

Conversation

@vdusek

@vdusekvdusek 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

@vdusekvdusek self-assigned this Aug 11, 2026
@vdusekvdusek 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-actionsgithub-actionsBot added the tested Temporary label used only programatically for some analytics. label Aug 11, 2026
@codecov

codecovBot 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 95.01%. Comparing base (00ce055) to head (4b5a50e).
⚠️ Report is 1 commits behind head on master.

Files with missing linesPatch %Lines
src/apify_client/http_clients/__init__.py87.50%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## master #1004 +/- ##
==========================================
+ Coverage 94.96% 95.01% +0.05% 
==========================================
Files 58 59 +1 Lines 5438 5501 +63 ==========================================
+ Hits 5164 5227 +63 
Misses 274 274 
FlagCoverage Δ
integration92.07% <90.62%> (+0.47%)⬆️
unit85.96% <98.43%> (+0.14%)⬆️

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.

@vdusekvdusek changed the title feat: add httpx http client [test]feat: Add HTTPX-based HTTP clientAug 19, 2026
@vdusek
vdusek changed the base branch from master to unify-http-request-pipelineAugust 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 masterAugust 19, 2026 12:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhocAd-hoc unplanned task added during the sprint.t-toolingIssues with this label are in the ownership of the tooling team.testedTemporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@vdusek@apify-service-account