Repository navigation
Added
- Callback support: Execute custom code on errors or successful requests
ErrorContextdataclass providing exception, request, response, and suppression statuson_errorcallback invoked for all HTTP errors (both suppressed and raised)on_successcallback invoked when no error occurs- Support for callbacks via subclassing (define
on_error/on_successmethods) - Support for callbacks via
__init__parameters - Useful for integrating error tracking (Sentry), logging, and observability
- Added integration tests demonstrating realistic usage patterns with
raise_for_status() - Added version comparison links to CHANGELOG for easier navigation
- Added comprehensive callback tests (8 new test cases)
Changed
- Improved README comparison example to show realistic vanilla httpx error handling
- Updated all documentation examples to include
response.raise_for_status()calls - Refactored test suite to use
pytest.mark.parametrizefor better maintainability - Updated API documentation with callback usage patterns
Full Changelog: v1.0.0...v1.1.0