mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
datasette.client internal requests mechanism
Closes #943 * Datasette now requires httpx>=0.15 * Support OPTIONS without 500, closes #1001 * Added internals tests for datasette.client methods * Datasette's own test mechanism now uses httpx to simulate requests * Tests simulate HTTP 1.1 now * Added base_url in a bunch more places * Mark some tests as xfail - will remove that when new httpx release ships: #1005
This commit is contained in:
parent
7249ac5ca0
commit
8f97b9b58e
18 changed files with 163 additions and 100 deletions
|
|
@ -113,6 +113,15 @@ class BaseView:
|
|||
async def options(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)
|
||||
|
||||
async def patch(self, request, *args, **kwargs):
|
||||
return Response.text("Method not allowed", status=405)
|
||||
|
||||
async def delete(self, request, *args, **kwargs):
|
||||
return Response.text("Method not allowed", status=405)
|
||||
|
||||
async def dispatch_request(self, request, *args, **kwargs):
|
||||
handler = getattr(self, request.method.lower(), None)
|
||||
return await handler(request, *args, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue