Base Generic View `_allowed_methods` could accept request args.
|Reported by:||Keryn Knight <django@…>||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently, View._allowed_methods doesn't take into account the potential need for the request to change the availability/discover of methods, if for example the request comes with a token, cookie or whatever that grants additional method access.
_allowed_methods is used in the base View by the options HTTP verb and in http_method_not_allowed, both of which could pass on request, *args, **kwargs to _allowed_methods, and looking at GitHub's results seems to indicate that's the only place it's used. Meanwhile Sourcegraph suggests that the only real public usage (admittedly in a largely depended upon package) downstream is in Django-Rest-Framework.