[][src]Module tide::redirect

HTTP redirection endpoints.

Examples

use tide::redirect;

let mut app = tide::new();
app.at("/").get(|_| async move { Ok("meow") });
app.at("/nori").get(redirect::temporary("/"));
app.listen("127.0.0.1:8080").await?;

Structs

PermanentRedirect

A permanent redirection endpoint.

TemporaryRedirect

A temporary redirection endpoint.

Functions

permanent

Redirect a route permanently to another route.

temporary

Redirect a route temporarily to another route.