New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add redirect support #84
Comments
ctx.Writer.Header().Set("Location", "/location")
ctx.Abort(302) Does just that. |
ok, agree, but why would one have to know the headers and status that have to be set for redirect. it should be plain and simple one-liner call like this |
@tarqe39 Agree, c.Redirect("http://example.com") is easy to know about the code mean. |
Agree. c.Redirect("http://example.com") is better. |
Hi guys! I just merged the Redirect pull request from @alexandernyquist in develop ceec1b6 The API is: c.Redirect(301, "http://example.com") |
@manucorporat Great jobs and thanks for your work. Has been long time not hear about Gin updated. |
@johndeng I am back to work, 355 days left until next stop ;) |
@manucorporat wow. work so hard. hope to see the Gin move to v1.0, so i can using in production. :P |
Thx everyone :) |
Could you please put additional function on contex that would redirect. Something like:
c.Writer.Header().Add("Location", "http://www.example.com")
c.Writer.WriteHeader(302)
it is very commonly used...
The text was updated successfully, but these errors were encountered: