pub fn create_temporary_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 307
status.
Examples
fn handler(state: State) -> (State, Response<Body>) {
let resp = create_temporary_redirect(&state, "/quick-detour");
(state, resp)
}