Bases: Generic[TResponse]
, ABC
A description of an HTTP request.
path
abstractmethod
property
The path part of the URL.
body
property
An optional body of the request.
Defaults to None
.
headers: list[tuple[str, str]]
HTTP headers to include in the request.
Defaults to empty list.
method
property
The HTTP method to use.
Defaults to HttpMethod.GET
.
map_response
abstractmethod
map_response(response: str) -> TResponse
Map raw response text to an object.
Parameters:
Name |
Type |
Description |
Default |
response |
str
|
|
required
|
Returns:
Type |
Description |
TResponse
|
The mapped response object.
|