Coverage for human_requests / abstraction / request.py: 100%
15 statements
« prev ^ index » next coverage.py v7.12.0, created at 2025-11-25 10:02 +0000
« prev ^ index » next coverage.py v7.12.0, created at 2025-11-25 10:02 +0000
1from dataclasses import dataclass
2from typing import TYPE_CHECKING, Optional
4from .http import URL, HttpMethod
6if TYPE_CHECKING:
7 from ..human_page import HumanPage
10@dataclass(frozen=True)
11class FetchRequest:
12 """Represents all the data passed in the request."""
14 page: "HumanPage"
15 """The page that made the request."""
17 method: HttpMethod
18 """The method used in the request."""
20 url: URL
21 """The URL of the request."""
23 headers: dict
24 """The headers of the request."""
26 body: Optional[str | list | dict]
27 """The body of the request."""