Closed SumonMSelim closed 7 years ago
Just use standard HTTP way Location
header and 30x responses: https://en.wikipedia.org/wiki/URL_redirection#HTTP_status_codes_3xx
return request.Response(headers={'Location': '/login'}, code=302) return request.Response(headers={'Location': '/'}, code=302)
I want to redirect my response to an url rather than returning something. At the moment, I am doing it this way:
return request.Response(headers={'Refresh': '0; url=https://github.com/squeaky-pl/japronto'})
Is there any better way?