Constant REDIRECT_HEADER

pub const REDIRECT_HEADER: &'static str;
Expand description

A custom header that can be set with any value to indicate that the server function client should redirect to a new route.

This is useful because it allows returning a value from the request, while also indicating that a redirect should follow. This cannot be done with an HTTP 3xx status code, because the browser will follow that redirect rather than returning the desired data.