MCPcopy Create free account
hub / github.com/encode/starlette / RedirectResponse

Class RedirectResponse

starlette/responses.py:206–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204
205
206class RedirectResponse(Response):
207 def __init__(
208 self,
209 url: str | URL,
210 status_code: int = 307,
211 headers: Mapping[str, str] | None = None,
212 background: BackgroundTask | None = None,
213 ) -> None:
214 super().__init__(content=b"", status_code=status_code, headers=headers, background=background)
215 self.headers["location"] = quote(str(url), safe=":/%#?=@[]!$&'()*+,;")
216
217
218Content = str | bytes | memoryview

Callers 8

get_responseMethod · 0.90
async_wrapperFunction · 0.90
sync_wrapperFunction · 0.90
appMethod · 0.90
__call__Method · 0.90
__call__Method · 0.90
appFunction · 0.90
appFunction · 0.90

Calls

no outgoing calls

Tested by 2

appFunction · 0.72
appFunction · 0.72