(self, request: Request, call_next: RequestResponseEndpoint)
| 5 | |
| 6 | class 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 |
nothing calls this directly
no outgoing calls
no test coverage detected