Skip to content

Redirect status code

Choose a tag to compare

@gebes gebes released this 31 Dec 11:34
· 74 commits to main since this release

Minor change to the Redirect response

There now provides the option to set the status code for a Redirect response.

func Redirect(code int, url string) HttpResponse {
router.Get("/redirect", func(request HttpRequest) HttpResponse {
	return Redirect(StatusMovedPermanently, "https://google.com")
})