Dynamo.HTTP.Redirect
Conveniences to redirect a connection. To use them, just import this module.
Functions summary
redirect(conn, opts) | Redirects the connection to the given endpoint. |
redirect!(conn, opts) | A convenience that redirects and halts straight away. |
Functions
redirect(conn, opts)
Redirects the connection to the given endpoint.
Options
to
- the path or url to redirect tostatus
- the status to redirect to, defaults to 302format
- the response format
Examples
redirect conn, to: "/"
redirect conn, to: "/", format: :html