Redirects
Use httpx.NewRedirectResponse
to send an HTTP redirect.
return httpx.NewRedirectResponse(http.StatusFound, "/login")
The helper ensures the status code is valid and sets the Location
header for you.
Last updated on
Use httpx.NewRedirectResponse
to send an HTTP redirect.
return httpx.NewRedirectResponse(http.StatusFound, "/login")
The helper ensures the status code is valid and sets the Location
header for you.