harp.http.requests¶
- class HttpRequest[source]¶
Bases:
BaseHttpMessage
- __init__(impl=None, *, extensions=None, **kwargs)[source]¶
- Parameters:
impl (HttpRequestBridge | None)
extensions (dict | None)
- async aread()[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.
- Return type:
- 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: CIMultiDict¶
- property stream¶