Closed wojtekmach closed 6 months ago
The arity/1 makes sense from Plug.run/1 point of view, there are no options to pass around, so they have to be captured inside arity/1 functions. I don't think it is part of the Plug contract, so I don't think Bandit should support it because of Plug (it is their own call).
You can always have {Plug.Call, &fun/1}
though and pass that to Bandit.
In
Plug
moduledoc we have:however in
Plug.run
doc we have:I'm not sure how, if at all, solve this inconsistency given the vast majority of plugs are modules with call/2 and functions called by
plug
macro which then need to be of arity 2.