pub fn temporary(uri: impl AsLocation) -> impl Reply
Expand description
A simple 307
temporary redirect to a different location.
This is similar to see_other
but the HTTP method and the body of the request
to the new location will be the same as the method and body of the current request.
Example
use warp::{http::Uri, Filter};
let route = warp::path("v1")
.map(|| {
warp::redirect::temporary(Uri::from_static("/v2"))
});