Response API — Aquilia Documentation
Comprehensive guide and documentation for Response API in the Aquilia framework. View API reference, examples, and implementation patterns.
HTTP Client / Core API response.py Immutable response envelope with lazy body consumption, streaming iterators, text/JSON decoding helpers, status classification, and fault-aware status escalation. 1. Overview response.py is the terminal read model for outbound HTTP execution. It provides a single object that supports both buffered and streaming usage patterns. 2. Architecture and Design • Headers are stored as dictionaries supporting case-insensitive lookups. • Body can be pre-buffered or lazy-streamed with one-time consumption semantics. 3. API Reference {`@dataclass class HTTPClientResponse: status_code: int headers: dict[str, str] url: str http_version: str = "1.1" elapsed: float = 0.0 history: list[HTTPClientResponse] = field(default_factory=list) _body: bytes | None = None _stream: AsyncIterator[bytes] | None = None @property def is_success(self) -> bool: return 200 )
Go to Homepage