MCPcopy Index your code
hub / github.com/RustPython/RustPython / redirect

Method redirect

Lib/test/test_urllib2.py:1273–1275  ·  view source on GitHub ↗
(h, req, url=to_url)

Source from the content-addressed store, hash-verified

1271 req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT
1272
1273 def redirect(h, req, url=to_url):
1274 h.http_error_302(req, MockFile(), 302, "Blah",
1275 MockHeaders({"location": url}))
1276 # Note that the *original* request shares the same record of
1277 # redirections with the sub-requests caused by the redirections.
1278

Callers

nothing calls this directly

Calls 3

MockHeadersClass · 0.85
http_error_302Method · 0.80
MockFileClass · 0.70

Tested by

no test coverage detected