MCPcopy Create free account
hub / github.com/python-websockets/websockets / redirect

Method redirect

src/websockets/sync/router.py:182–185  ·  view source on GitHub ↗
(self, connection: ServerConnection, url: str)

Source from the content-addressed store, hash-verified

180 return self.server_name
181
182 def redirect(self, connection: ServerConnection, url: str) -> Response:
183 response = connection.respond(http.HTTPStatus.FOUND, f"Found at {url}")
184 response.headers["Location"] = url
185 return response
186
187 def not_found(self, connection: ServerConnection) -> Response:
188 return connection.respond(http.HTTPStatus.NOT_FOUND, "Not Found")

Callers 1

route_requestMethod · 0.95

Calls 1

respondMethod · 0.45

Tested by

no test coverage detected