To redirect to the URL derived from the specified path, with specified status.
(location string)
| 329 | |
| 330 | // To redirect to the URL derived from the specified path, with specified status. |
| 331 | func (r *Redirect) To(location string) error { |
| 332 | r.c.setCanonical(HeaderLocation, location) |
| 333 | r.c.Status(r.status) |
| 334 | |
| 335 | r.processFlashMessages() |
| 336 | |
| 337 | return nil |
| 338 | } |
| 339 | |
| 340 | // Route redirects to the Route registered in the app with appropriate parameters. |
| 341 | // If you want to send queries or params to route, you should use config parameter. |