Skip to content

Response

eternaltwin.responses.Response

Response(url: str, status_code: int, content: bytes, headers: Mapping[str, str])

Common interface for responses from the sync and async clients.

from_requests classmethod

from_requests(response: Response) -> Self

Create a Response from a requests.Response.

from_aiohttp async classmethod

from_aiohttp(response: ClientResponse) -> Self

Create a Response from a aiohttp.ClientResponse.

json

json() -> dict[str, Any]

Interpret the response content as JSON and return the resulting dict.