Dynamo.HTTP.Redirect

Conveniences to redirect a connection. To use them, just import this module.

Source

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 to
  • status - the status to redirect to, defaults to 302
  • format - the response format

Examples

redirect conn, to: "/"
redirect conn, to: "/", format: :html
Source

redirect!(conn, opts)

A convenience that redirects and halts straight away.

Source