Function gotham::helpers::http::response::create_permanent_redirect[][src]

pub fn create_permanent_redirect<L: Into<Cow<'static, str>>>(
    state: &State,
    location: L
) -> Response<Body>
Expand description

Produces a simple empty Response with a Location header and a 308 status.

Examples

fn handler(state: State) -> (State, Response<Body>) {
    let resp = create_permanent_redirect(&state, "/over-there");

    (state, resp)
}