harborapi.responselog
A log of HTTP responses.
Source code in harborapi/responselog.py
entries: Deque[ResponseLogEntry] = deque(maxlen=max_logs)
instance-attribute
__init__(max_logs=None)
add(entry)
resize(max_logs)
clear()
__iter__()
__getitem__(index)
Bases: NamedTuple
A log entry for an HTTP response.
Source code in harborapi/responselog.py
url: URL
instance-attribute
An httpx.URL object representing the URL of the request. Can be cast to string using str()
.
method: str
instance-attribute
The HTTP method used for the request.
status_code: int
instance-attribute
The HTTP status code of the response.
duration: float
instance-attribute
The duration of the full request/response cycle in seconds.
response_size: int
instance-attribute
The size of the response body in bytes.