Default 405 for POST, plus tests

This commit is contained in:
Simon Willison 2021-06-23 15:27:30 -07:00
commit 4a3e8561ab
2 changed files with 10 additions and 0 deletions

View file

@ -106,6 +106,9 @@ class BaseView:
async def options(self, request, *args, **kwargs):
return Response.text("Method not allowed", status=405)
async def post(self, request, *args, **kwargs):
return Response.text("Method not allowed", status=405)
async def put(self, request, *args, **kwargs):
return Response.text("Method not allowed", status=405)