MCPcopy
hub / github.com/gofiber/fiber / Redirect

Method Redirect

ctx.go:345–352  ·  view source on GitHub ↗

Redirect returns the Redirect reference. Use Redirect().Status() to set custom redirection status code. If status is not specified, status defaults to 303 See Other. You can use Redirect().To(), Redirect().Route() and Redirect().Back() for redirection.

()

Source from the content-addressed store, hash-verified

343// If status is not specified, status defaults to 303 See Other.
344// You can use Redirect().To(), Redirect().Route() and Redirect().Back() for redirection.
345func (c *DefaultCtx) Redirect() *Redirect {
346 if c.redirect == nil {
347 c.redirect = AcquireRedirect()
348 c.redirect.c = c
349 }
350
351 return c.redirect
352}
353
354// ViewBind Add vars to default view var map binding to template engine.
355// Variables are read by the Render method and may be overwritten.

Callers

nothing calls this directly

Calls 1

AcquireRedirectFunction · 0.85

Tested by

no test coverage detected