Skip to content

Streaming and raw response support - #14

Open
m-xim wants to merge 13 commits into
goduni:masterfrom
m-xim:stream_rawrequest
Open

Streaming and raw response support#14
m-xim wants to merge 13 commits into
goduni:masterfrom
m-xim:stream_rawrequest

Conversation

@m-xim

@m-xim m-xim commented Jul 24, 2026

Copy link
Copy Markdown

Description

  • Added HTTPResponse.raise_for_status().
  • Added raw response support in HTTPRequest.
  • Added support for the stream method.
  • Replaced deprecated urllib.getcode() with raw.status.
  • AsyncMock() without spec made the sync build_request async too, leaking an unawaited coroutine. Add spec=httpx(2).AsyncClient so only send() is async.

Type of change

  • Bug fix (a non-breaking change that resolves an issue)
  • New feature (a non-breaking change that adds functionality)
  • This change requires a documentation update

Checklist

  • My code adheres to the style guidelines of this project (just lint shows no errors)
  • I have conducted a self-review of my own code
  • I have made the necessary changes to the documentation
  • My changes do not generate any new warnings
  • I have added tests to validate the effectiveness of my fix or the functionality of my new feature
  • I have ensured that static analysis tests are passing by running just static-analysis
  • I have included code examples to illustrate the modifications

@m-xim m-xim changed the title Stream rawrequest Streaming and Raw Response Support Jul 24, 2026
@m-xim m-xim changed the title Streaming and Raw Response Support Streaming and raw response support Jul 24, 2026
@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.49550% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.50%. Comparing base (a123619) to head (4c52ea4).

Files with missing lines Patch % Lines
src/unihttp/http/stream.py 83.33% 10 Missing ⚠️
src/unihttp/clients/zapros.py 91.07% 5 Missing ⚠️
src/unihttp/http/response.py 42.85% 4 Missing ⚠️
src/unihttp/clients/niquests.py 98.27% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##            master      #14      +/-   ##
===========================================
- Coverage   100.00%   98.50%   -1.50%     
===========================================
  Files           32       33       +1     
  Lines          990     1336     +346     
===========================================
+ Hits           990     1316     +326     
- Misses           0       20      +20     

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

1 participant