pub fn error_for_status(self) -> crate::Result<Self> {
        let status = self.status();
        if status.is_client_error() || status.is_server_error() {
            Err(crate::error::status_code(*self.url, status))
        } else {
            Ok(self)
        }
    }
/// Turn a response into an error if the server returned an error.
Turn a response into an error if the server returned an error.
Turn a response into an error if the server returned an error .
pub fn error_for_status(self) -> crate::Result<Self> {
        let status = self.status();
        if status.is_client_error() || status.is_server_error() {
            Err(crate::error::status_code(*self.url, status))
        } else {
            Ok(self)
        }
    }
pub fn error_for_status ( self ) -> crate :: Result < Self > { let status = self . status ( ) ; if status . is_client_error ( ) || status . is_server_error ( ) { Err ( crate :: error :: status_code ( * self . url , status ) ) } else { Ok ( self ) } }
Turn a response into an error if the server returned an error.
Turn a response into an error if the server returned an error .
self
self