MCPcopy
hub / github.com/encode/starlette / method_not_allowed

Function method_not_allowed

tests/test_applications.py:32–33  ·  tests/test_applications.py::method_not_allowed
(request: Request, exc: HTTPException)

Source from the content-addressed store, hash-verified

30
31
32async def method_not_allowed(request: Request, exc: HTTPException) -> JSONResponse:
33 return JSONResponse({class="st">"detail": class="st">"Custom message"}, status_code=405)
34
35
36async def http_exception(request: Request, exc: HTTPException) -> JSONResponse:

Callers

nothing calls this directly

Calls 1

JSONResponseClass · 0.90

Tested by

no test coverage detected