pigeon.middleware.processing¶
Module Contents¶
- class pigeon.middleware.processing.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.processing.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¶
- pigeon.middleware.processing.error(code: int, request: pigeon.http.request.HTTPRequest | None = None) pigeon.http.response.HTTPResponse | str ¶
Returns the HTTPResponse for the error code provided, request parameter optional
- class pigeon.middleware.processing.Processor¶
- classmethod preprocess(request: pigeon.http.HTTPRequest) pigeon.http.HTTPRequest | pigeon.http.HTTPResponse ¶
- Abstractmethod:
- classmethod process(request: pigeon.http.HTTPRequest, func: Callable)¶
- Abstractmethod:
- classmethod postprocess(response: pigeon.http.HTTPResponse, request: pigeon.http.HTTPRequest) pigeon.http.HTTPResponse ¶
- Abstractmethod:
- class pigeon.middleware.processing.ComponentProcessor¶
Bases:
Processor
- preprocessing_components = []¶
- processing_components = []¶
- postprocessing_components = []¶
- classmethod preprocess(request: pigeon.http.HTTPRequest) pigeon.http.HTTPRequest | pigeon.http.HTTPResponse ¶
- classmethod process(request: pigeon.http.HTTPRequest) pigeon.http.HTTPResponse ¶
- classmethod postprocess(response: pigeon.http.HTTPResponse, request: pigeon.http.HTTPRequest) pigeon.http.HTTPResponse ¶
- class pigeon.middleware.processing.Owl¶
Bases:
ComponentProcessor
Processes requests using the HTTP/1.1 protocol
- preprocessing_components¶
- processing_components¶
- postprocessing_components¶
- class pigeon.middleware.processing.Raven¶
Bases:
ComponentProcessor
Processes requests using the HTTP/2.0 protocol