roboto.http.request#
Module Contents#
- roboto.http.request.ALWAYS_SCRUBBED_HEADERS#
Header names, lowercase, whose values are always scrubbed from rendered requests.
- class roboto.http.request.BatchRequest(/, **data)#
Bases:
pydantic.BaseModel,Generic[Model]Batched HTTP requests
- Parameters:
data (Any)
- requests: list[Model]#
- class roboto.http.request.HttpRequest(url, method='GET', headers=None, data=None, retry_wait=None, idempotent=False)#
- Parameters:
url (str)
method (str)
headers (Optional[dict[str, str]])
data (Any)
retry_wait (Optional[roboto.http.retry.RetryWaitFn])
idempotent (bool)
- append_headers(headers)#
- Parameters:
headers (dict[str, str])
- Return type:
None
- property body: bytes | None#
- Return type:
Optional[bytes]
- data: Any = None#
- describe(scrub_headers=())#
Render the request for logging, with sensitive header values replaced by
*.- Parameters:
scrub_headers (Collection[str]) – Header names, compared case-insensitively, to scrub in addition to
ALWAYS_SCRUBBED_HEADERS.- Return type:
str
- headers: dict#
- property hostname: str#
- Return type:
str
- idempotent: bool = False#
- method: str#
- retry_wait: roboto.http.retry.RetryWaitFn#
- url: str#
- roboto.http.request.HttpRequestDecorator#
- roboto.http.request.Model#