Function actix_web_lab::web::redirect

source ·
pub fn redirect(
    from: impl Into<Cow<'static, str>>,
    to: impl Into<Cow<'static, str>>
) -> Redirect
👎Deprecated since 0.19.0: Type has graduated to Actix Web.
Expand description

Create a relative or absolute redirect.

This feature has graduated to Actix Web. Further development will occur there.

See Redirect docs for usage details.

Examples

use actix_web::App;
use actix_web_lab::web as web_lab;

let app = App::new()
    .service(web_lab::redirect("/one", "/two"));