(self, request: Request)
| 46 | await response(self.scope, self.receive, self.send) |
| 47 | |
| 48 | async def method_not_allowed(self, request: Request) -> Response: |
| 49 | class="cm"># If we're running inside a starlette application then raise an |
| 50 | class="cm"># exception, so that the configurable exception handler can deal with |
| 51 | class="cm"># returning the response. For plain ASGI apps, just return the response. |
| 52 | headers = {class="st">"Allow": class="st">", ".join(self._allowed_methods)} |
| 53 | if class="st">"app" in self.scope: |
| 54 | raise HTTPException(status_code=405, headers=headers) |
| 55 | return PlainTextResponse(class="st">"Method Not Allowed", status_code=405, headers=headers) |
| 56 | |
| 57 | |
| 58 | class WebSocketEndpoint: |
nothing calls this directly
no test coverage detected