sync_and_async_middleware
Mark a middleware factory as returning a hybrid middleware supporting both types of request.
def sync_and_async_middleware(
func: function
) - > function
Mark a middleware factory as returning a hybrid middleware supporting both types of request.
Parameters
| Name | Type | Description |
|---|---|---|
| func | function | The middleware factory function to be marked as capable of handling both sync and async requests |
Returns
| Type | Description |
|---|---|
function | The original function decorated with attributes indicating both synchronous and asynchronous capability |