human_requests.abstraction.response

Classes

Response

Represents the response of a request.

Module Contents

class Response[source]

Represents the response of a request.

request: Request[source]

The request that was made.

url: URL[source]

The URL of the response. Due to redirects, it can differ from request.url.

headers: dict[source]

The headers of the response.

cookies: list[Cookie][source]

The cookies of the response.

body: str[source]

The body of the response.

status_code: int[source]

The status code of the response.

duration: float[source]

The duration of the request in seconds.

render(
wait_until: Literal['commit', 'load', 'domcontentloaded', 'networkidle'] = 'commit',
retry: int = 2,
) AsyncContextManager[playwright.async_api.Page][source]

Renders the response content in the current browser. It will look like we requested it through the browser from the beginning.

Recommended to use in cases when the server returns a JS challenge instead of a response.