Skip to content
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

NotFoundHandler can't write 404 status code and message #3

Open
tietang opened this issue Jun 23, 2017 · 0 comments
Open

NotFoundHandler can't write 404 status code and message #3

tietang opened this issue Jun 23, 2017 · 0 comments

Comments

@tietang
Copy link

tietang commented Jun 23, 2017

func NotFoundHandler(ctx *routing.Context) error {
ctx.WriteString("Not Found:" + strconv.Itoa(http.StatusNotFound))
ctx.Response.SetStatusCode(http.StatusNotFound)
return routing.NewHTTPError(http.StatusNotFound)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant