-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
- I have looked for existing issues (including closed) about this
Feature Request
Motivation
RFC 9110 specifies this about 303 See Other:
Except for responses to a HEAD request, the representation of a 303 response ought to contain a short hypertext note with a hyperlink to the same URI reference provided in the Location header field.
Proposal
impl IntoResponseParts for Redirect
This would allow doing:
(
Redirect::to(url),
Html(format!(
r#"<p>Redirecting to <a href="{url}">{url}</a></p>"#,
)),
)Alternatives
Currently, it'd have to be done manually like this:
(
StatusCode::SEE_OTHER,
[(header::LOCATION, url)],
Html(format!(
r#"<p>Redirecting to <a href="{url}">{url}</a></p>"#,
)),
)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels