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.http.requests¶
- class HttpRequest[source]¶
Bases:
BaseHttpMessage
- __init__(impl)[source]¶
- Parameters:
impl (HttpRequestBridge)
- async join()[source]¶
Read all chunks from request. We may want to be able to read partial body later, but for now it’s all or nothing. This method does nothing if the body has already been read.
- property body: bytes¶
Returns the previously read body of the request. Raises a RuntimeError if the body has not been read yet, you must await the read() asynchronous method first, which cannot be done here because properties are synchronous, so we let the user explicitely call it before.
- created_at: datetime¶
- property headers: CIMultiDictProxy¶
- property query: MultiDictProxy¶
Get the query string from the implementation bridge, as a read only proxy.
- class WrappedHttpRequest[source]¶
Bases:
HttpRequest
- __init__(wrapped, /)[source]¶
- Parameters:
wrapped (HttpRequest)
- property headers: MutableMapping¶