GitHub

API reference for web.

Requests and responses as asyncio code sees them (Effect's Web Request and Response): what web_handler handlers take and return, and what the ASGI adapter speaks.

A body is bytes, an async iterable of bytes (read once) or None. Header names are lowercase; repeated request headers are joined with ", ", and only set-cookie repeats in a response.

Types

TypeDefinitionDescription
WebBodytype WebBody = bytes | AsyncIterable[bytes] | None
HeaderLinestype HeaderLines = Mapping[str, str] | Iterable[tuple[str, str]]

Classes