harp.asgi.bridge.requests¶
- class HttpRequestAsgiBridge[source]¶
Bases:
HttpRequestBridge
Actually implements the getters required by HttpRequest using the asgi scope and receive callable. It is still an early implementation and will need to support streaming requests in the future.
- Parameters:
scope – see https://asgi.readthedocs.io/en/latest/specs/www.html#http-connection-scope
receive
- __init__(scope, receive)[source]¶
- Parameters:
scope (HTTPScope) – see https://asgi.readthedocs.io/en/latest/specs/www.html#http-connection-scope
receive (Callable[[], Awaitable[HTTPRequestEvent | HTTPDisconnectEvent | WebSocketConnectEvent | WebSocketReceiveEvent | WebSocketDisconnectEvent | LifespanStartupEvent | LifespanShutdownEvent]])
- get_headers()[source]¶
Get the headers from asgi scope, as a case-insensitive multidict.
- Return type:
CIMultiDict