reqivo.http packageΒΆ
SubmodulesΒΆ
reqivo.http.body moduleΒΆ
src/reqivo/http/body.py
HTTP body management (chunked, fixed-length, streaming) for Reqivo.
- reqivo.http.body.read_exact(sock: socket, n: int) bytes[source]ΒΆ
Read exactly n bytes from the socket.
reqivo.http.headers moduleΒΆ
src/reqivo/http/headers.py
Robust HTTP header management for Reqivo.
- class reqivo.http.headers.Headers(headers: Dict[str, str | List[str]] | None = None)[source]ΒΆ
-
Case-insensitive dictionary for HTTP headers with support for multiple values.
Behaves like a dictionary where values are strings. duplicate headers are joined by commas (except Set-Cookie). Access raw lists via get_all().
reqivo.http.http11 moduleΒΆ
src/reqivo/http/http11.py
Robust HTTP Parser implementation.
- class reqivo.http.http11.HttpParser(max_header_size: int = 8192, max_line_size: int = 8192, max_field_count: int = 100, max_body_size: int | None = None)[source]ΒΆ
Bases:
objectRobust HTTP/1.1 Parser.
Handles: - Status Line parsing. - Header parsing with duplicate handling. - Defensive sizing.
- parse_response(data: bytes) Tuple[int, str, Dict[str, List[str]], bytes][source]ΒΆ
Parse a full raw HTTP response (or at least headers).
- Returns:
Tuple of (status_code, status_line, headers, remaining_body)
- Raises:
ProtocolError β If headers are too large or malformed.
InvalidResponseError β If status line is invalid.
reqivo.http.status_codes moduleΒΆ
src/reqivo/http/status_codes.py
HTTP constants module.
This module will define HTTP-related constants such as status codes, header names, and protocol versions for use throughout Reqivo.
Currently empty - to be populated as needed.
reqivo.http.url moduleΒΆ
src/reqivo/http/url.py
URL builder and parser for Reqivo.