Skip to content

feat: add urllib backend#11

Merged
goduni merged 1 commit into
goduni:masterfrom
Hedgehog2484:feat/urllib-support
Jul 16, 2026
Merged

feat: add urllib backend#11
goduni merged 1 commit into
goduni:masterfrom
Hedgehog2484:feat/urllib-support

Conversation

@Hedgehog2484

Copy link
Copy Markdown
Contributor

Adds UrllibSyncClient — a synchronous transport built entirely on the standard library urllib, requiring no third-party HTTP dependency.

  • Mirrors existing backends (requests/httpx/niquests): JSON body, url-encoded form, multipart file uploads, query params, headers.
  • Maps URLError/timeouts to NetworkError/RequestTimeoutError; treats HTTPError as a response for non-2xx statuses.
  • Unit tests with 100% coverage of the module; README + backends reference updated.
  • Verified end-to-end against httpbin.org (JSON/form/multipart/404/cookies/network error/timeout).

Add UrllibSyncClient, a synchronous transport built entirely on the
standard library urllib — no third-party HTTP dependency required.

Mirrors the existing backends (requests/httpx/niquests): supports JSON
body, url-encoded form, multipart file uploads, query params and headers;
maps URLError/timeouts to NetworkError/RequestTimeoutError and treats
HTTPError as a response for non-2xx statuses.

Includes unit tests (100% coverage of the module) and docs updates
(README, backends reference).
@goduni
goduni merged commit d1f218b into goduni:master Jul 16, 2026
3 checks passed
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (cd273e5) to head (46d718a).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #11   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           31        32    +1     
  Lines          904       990   +86     
=========================================
+ Hits           904       990   +86     

☔ 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants