Attention
This is the documentation for HARP Proxy, actually published as an early preview. Both the software and documentation are a work in progress, and although we already use it on various production servers, they may contain inaccuracies, typographical errors, huge mistakes and empty pages. We work hard to eradicate all mistakes and implement stuff, but it is a long and tedious process. We appreciate your patience and understanding. Of course, any help will be greatly appreciated.
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
- get_path()[source]¶
Get the HTTP path from asgi scope (/foo/bar), without the query string part.
- Return type: