// WithPermanentRedirect responds with a redirection to the specific path or URL with the // http.StatusMovedPermanently status. func (r *GowebHTTPResponder) WithPermanentRedirect(ctx context.Context, pathOrURLSegments ...interface{}) error { ctx.HttpResponseWriter().Header().Set("Location", paths.PathFromSegments(pathOrURLSegments...)) return r.WithStatus(ctx, http.StatusMovedPermanently) }
// RedirectTo writes the Location header. func RedirectTo(response http.ResponseWriter, pathOrURLSegments ...interface{}) { response.Header().Set(headerKeyLocation, paths.PathFromSegments(pathOrURLSegments...)) }