Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tower-http/src/follow_redirect/policy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,15 @@ impl<'a> Attempt<'a> {
pub fn previous(&self) -> &'a Uri {
self.previous
}

/// Creates a new `Attempt`.
pub fn new(status: StatusCode, location: &'a Uri, previous: &'a Uri) -> Self {
Self {
status,
location,
previous,
}
}
}

/// A value returned by [`Policy::redirect`] which indicates the action
Expand Down
Loading