[−][src]Struct reqwest::RedirectAttempt
A type that holds information on the next request and previous requests in redirect chain.
Methods
impl<'a> RedirectAttempt<'a>
[src]
pub fn status(&self) -> StatusCode
[src]
Get the type of redirect.
pub fn url(&self) -> &Url
[src]
Get the next URL to redirect to.
pub fn previous(&self) -> &[Url]
[src]
Get the list of previous URLs that have already been requested in this chain.
pub fn follow(self) -> RedirectAction
[src]
Returns an action meaning reqwest should follow the next URL.
pub fn stop(self) -> RedirectAction
[src]
Returns an action meaning reqwest should not follow the next URL.
The 30x response will be returned as the Ok
result.
pub fn loop_detected(self) -> RedirectAction
[src]
Returns an action meaning there was a loop of redirects found.
An Error
will be returned for the result of the sent request.
pub fn too_many_redirects(self) -> RedirectAction
[src]
Returns an action meaning there was a loop of redirects found.
An Error
will be returned for the result of the sent request.
Trait Implementations
Auto Trait Implementations
impl<'a> Send for RedirectAttempt<'a>
impl<'a> Unpin for RedirectAttempt<'a>
impl<'a> Sync for RedirectAttempt<'a>
impl<'a> UnwindSafe for RedirectAttempt<'a>
impl<'a> RefUnwindSafe for RedirectAttempt<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,