Coverage for human_requests/abstraction/request.py: 100%

16 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-09-13 21:41 +0000

1from dataclasses import dataclass 

2from typing import Optional 

3 

4from .cookies import Cookie 

5from .http import URL, HttpMethod 

6 

7 

8@dataclass(frozen=True) 

9class Request: 

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

11 

12 method: HttpMethod 

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

14 

15 url: URL 

16 """The URL of the request.""" 

17 

18 headers: dict 

19 """The headers of the request.""" 

20 

21 body: Optional[str | list | dict] 

22 """The body of the request.""" 

23 

24 cookies: list[Cookie] 

25 """The cookies passed in the request."""