Use _MiddlewareFactory as decorator with arguments#228
Conversation
|
@renyidong Could you update this PR with a test case showing your intended workflow? I think the idea itself is fine! |
|
@mmerickel Taking the example from http://docs.webob.org/en/latest/api/dec.html I have to define an extra function and wrap it with the middleware. With this patch, I would be able to achieve same effect as the example at very beginning. |
|
@renyidong I understand the patch. I was asking if you could please add a test case to the codebase to ensure this keeps working in the future. |
|
@mmerickel Apologies for my misinterpret. I appended test code to |
|
A separate test would be preferred. Thanks! |
|
@bertjwregeer Let me know if there is anything else you need. |
|
LGTM! |
|
Sorry for taking so long! I've merged this into master. |
This change allows _MiddlewareFactory to be used as decorator with argument: