Closed peterkronenberg closed 3 months ago
The only way this is currently possible is by first defining a helper function that handles the method's logic and calling it from two separate routes. This could possibly be changed, would likely need a Parameter
subclass (AnyOf
, or some other name) that takes in a list of the locations it should accept parameters from in the order of precedence.
Is there a way I can have a function which works with both Post and Get, where it finds the value in the appropriate place depending on the method?
Basically, something like this: