runzero.client._http.io
¶
io contains classes which wrap network communication and handle errors in a consistent fashion.
Module Contents¶
Classes¶
A wrapper around API http requests to keep all callers in-bounds. |
|
The response from an HTTP request. |
- class runzero.client._http.io.Request(url: str, token: str, method: str, handlers: List[HandlerType] | None = None, params: Dict[str, Any] | None = None, timeout: int | None = None, validate_certificate: bool | None = None, data: Any | None = None, files: Any | None = None, multipart: bool | None = None)[source]¶
A wrapper around API http requests to keep all callers in-bounds.
- Parameters:
url (str) – The url to send the request to
method (str) – The REST verb to use
handlers (Optional[List[HandlerType]]) – A list of handler functions to apply to each request
params (Optional[Dict[str, Any]]) – Any additional query parameters
validate_certificate (Optional[bool]) – False to disable server certificate validation. Default is True (validate).
data (Optional[Any]) – The data to send in form body (POST, PATCH, PUT)
files (Optional[Any]) – For multipart form data or file uploads. Format varies.
multipart (Optional[bool]) – True if using a multipart form data (combination file[s] and form data)
Class constructor