Module warp::redirect

source ·
Expand description

Redirect requests to a new location.

The types in this module are helpers that implement Reply, and easy to use in order to setup redirects.

Traits

  • Trait for redirect locations. Currently only a Uri can be used in redirect. This sealed trait exists to allow adding possibly new impls so other arguments could be accepted, like maybe just warp::redirect("/v2").

Functions

  • A simple 302 found redirect to a different location
  • A simple 308 permanent redirect to a different location.
  • A simple 301 permanent redirect to a different location.
  • A simple 303 redirect to a different location.
  • A simple 307 temporary redirect to a different location.