HTTPRequest

dotflow.abc.http.HTTPRequest

Bases: ABC

Source code in dotflow/abc/http.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
class HTTPRequest(ABC):

    def __init__(self, url: str, context: Callable):
        self.url = url
        self.context = context

    @abstractmethod
    def request(
        self,
        method: str,
        body: dict,
        params: dict,
        headers: dict,
    ) -> None:
        pass

context = context instance-attribute

url = url instance-attribute

__init__(url, context)

Source code in dotflow/abc/http.py
 9
10
11
def __init__(self, url: str, context: Callable):
    self.url = url
    self.context = context

request(method, body, params, headers) abstractmethod

Source code in dotflow/abc/http.py
13
14
15
16
17
18
19
20
21
@abstractmethod
def request(
    self,
    method: str,
    body: dict,
    params: dict,
    headers: dict,
) -> None:
    pass