[−][src]Function gotham::helpers::http::response::create_permanent_redirect
pub fn create_permanent_redirect<L: Into<Cow<'static, str>>>(
state: &State,
location: L
) -> Response<Body>
Produces a simple empty Response
with a Location
header and a 301
status.
Examples
fn handler(state: State) -> (State, Response<Body>) { let resp = create_permanent_redirect(&state, "/over-there"); (state, resp) }