/// Set Response's redirect location as status code.
///
/// # Examples
///
/// ```rust
/// # use direkuta::prelude::*;
/// let mut res = Response::new();
/// res.redirect("/example/moved");
/// ```
Set Response's redirect location as status code.
Set Response ' s redirect location as status code .
pub fn redirect(&mut self, url: &'static str) {
        self.set_status(301);
        let _ = self
            .headers_mut()
            .insert(header::LOCATION, HeaderValue::from_static(url));
    }
pub fn redirect ( & mut self , url : & ' static str ) { self . set_status ( 301 ) ; let _ = self . headers_mut ( ) . insert ( header :: LOCATION , HeaderValue :: from_static ( url ) ) ; }
Set Response's redirect location as status code.
Set Response ' s redirect location as status code .
&mut self
url
&'static str
examples
None
use direkuta::prelude::*;
let mut res = Response::new();
res.redirect("/example/moved");
```
let mut res = Response :: new () ; res . redirect ( " / example / moved " ) ; ` ` `