Functions
build_base_scope
8
dict[str, Any]
▼
Build the common ASGI scope fields shared across all protocols.
build_base_scope
8
dict[str, Any]
▼
def build_base_scope(request: RequestReceived, *, scope_type: str, http_version: str, scheme: str, server: tuple[str, int], client: tuple[str, int], root_path: str, extensions: dict[str, Any] | None = None) -> dict[str, Any]
Parameters
| Name | Type | Description |
|---|---|---|
request |
RequestReceived |
Parsed HTTP request head. |
scope_type |
str |
ASGI scope type ( |
http_version |
str |
Protocol version string ( |
scheme |
str |
URL scheme ( |
server |
tuple[str, int] |
Local |
client |
tuple[str, int] |
Remote |
root_path |
str |
ASGI root_path for reverse proxy setups. |
extensions |
dict[str, Any] | None |
Optional ASGI extensions dict. Default:None
|
Returns
dict[str, Any]