Base Middlewares¶
- class blacksmith.middleware._async.base.AsyncHTTPMiddleware¶
Inject data in http query on every requests.
- async initialize() None ¶
Asynchronous initialization of a middleware.
For instance, used to initialize connection to storage backend.
- __call__(next: AsyncMiddleware) AsyncMiddleware ¶
Call self as a function.
- class blacksmith.middleware._async.base.AsyncHTTPAddHeadersMiddleware(headers: dict[str, str])¶
Generic middleware that inject HTTP headers.
- Params:
headers to inject in HTTP requests.
- __init__(headers: dict[str, str])¶
- headers: dict[str, str]¶
- __call__(next: AsyncMiddleware) AsyncMiddleware ¶
Call self as a function.