pub fn found(uri: impl AsLocation) -> impl Reply
Expand description
HTTP 302 Found (or Temporary Redirect) Description: The requested resource can be found at a different URL temporarily. Usage: Historically, this status code was used for temporary redirects. However, its meaning was often misunderstood, and different clients treated it differently. As a result, it is recommended to use 307 (or 303) for temporary redirects instead. Common Use Case: Rarely used directly due to ambiguity; replaced by 307 or 303.
§Example
use warp::{http::Uri, Filter};
let route = warp::path("v1")
.map(|| {
warp::redirect::found(Uri::from_static("/v2"))
});