MCPcopy Create free account
hub / github.com/dbunt1tled/python-fast-api / dispatch

Method dispatch

src/core/http/middleware/json_api.py:7–13  ·  view source on GitHub ↗
(self, request: Request, call_next: RequestResponseEndpoint)

Source from the content-addressed store, hash-verified

5
6class JSONAPIMiddleware(BaseHTTPMiddleware):
7 async def dispatch(self, request: Request, call_next: RequestResponseEndpoint) -> Response:
8 response = await call_next(request)
9
10 if response.headers.get("content-type", "").startswith("application/json"):
11 response.headers["content-type"] = "application/vnd.api+json"
12
13 return response

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected