1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use crate::;
/// Creates a 302 Found redirect response to the specified location.
///
/// This is a convenience wrapper around [`redirect_with_status`] for the common case.
///
/// # Example
/// ```
/// use velto::response::redirect;
///
/// let response = redirect("/login");
/// ```
/// Creates a redirect response with a custom status code.
///
/// This sets the `Location` header and returns an empty body. Common status codes include:
/// - `301` (Moved Permanently)
/// - `302` (Found)
/// - `303` (See Other)
/// - `307` (Temporary Redirect)
/// - `308` (Permanent Redirect)
///
/// # Example
/// ```
/// use velto::response::redirect_with_status;
///
/// let response = redirect_with_status("/new-url", 301);
/// ```