pigeon.middleware.components.component¶
Module Contents¶
- class pigeon.middleware.components.component.HTTPRequest(method: str, path: str, headers: dict = None, get: dict = None, data=None, files=None, protocol: str = '1.1', content_type=None, **kwargs)¶
Bases:
pigeon.http.message.HTTPMessage
An HTTP message (obv either response or request)
- property is_error¶
- class pigeon.middleware.components.component.HTTPResponse(headers: dict = None, data: str = None, status: int = 200, cookies=None, protocol: str = '1.1', content_type=None, **kwargs)¶
Bases:
pigeon.http.message.HTTPMessage
An HTTP message (obv either response or request)
- property is_error¶
- class pigeon.middleware.components.component.MiddlewareComponent¶
Middleware component that can be used by a preprocessor or postprocessor to process requests.
- classmethod preprocess(request: pigeon.http.HTTPRequest) pigeon.http.HTTPRequest | pigeon.http.HTTPResponse ¶
- Abstractmethod:
- classmethod process(request: pigeon.http.HTTPRequest, func: Callable)¶
- classmethod postprocess(response: pigeon.http.HTTPResponse, request: pigeon.http.HTTPRequest) pigeon.http.HTTPResponse ¶
- Abstractmethod: