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

1from dataclasses import dataclass 

2from typing import TYPE_CHECKING, Optional 

3 

4from .http import URL, HttpMethod 

5 

6if TYPE_CHECKING: 

7 from ..human_page import HumanPage 

8 

9 

10@dataclass(frozen=True) 

11class FetchRequest: 

12 """Represents all the data passed in the request.""" 

13 

14 page: "HumanPage" 

15 """The page that made the request.""" 

16 

17 method: HttpMethod 

18 """The method used in the request.""" 

19 

20 url: URL 

21 """The URL of the request.""" 

22 

23 headers: dict 

24 """The headers of the request.""" 

25 

26 body: Optional[str | list | dict] 

27 """The body of the request."""