Redirect¶
A validated redirect hop, ready to follow.
The Location header has been resolved against the request URL, security
rules applied (credentials stripped on a cross-origin hop, https-to-http
downgrade refused before a Redirect is ever built), and the method and
body rewritten for the response status. The remaining hop count is already
decremented for the next hop.
RedirectFollower uses this internally — application code does not interact with it directly. The constructor is private so the security rules cannot be bypassed and the remaining hop count cannot be reset.
Public Functions¶
status¶
The redirect status code (301, 302, 303, 307, or 308).
Returns¶
- U16 val
target¶
The resolved absolute URL to follow.
Returns¶
- URI val
request¶
The request to send on the next hop: the original request with its method and body rewritten for the status and its headers stripped for a cross-origin hop.
Returns¶
- HTTPRequest val
remaining¶
How many redirect hops may still be followed after this one.
Returns¶
- USize val