pub trait ResponseExt: Sized {
// Required method
fn error_for_status(self) -> Result<Self, HttpError>;
}
Expand description
Methods to make working with responses from the HttpClient
trait easier.
Required Methods§
Sourcefn error_for_status(self) -> Result<Self, HttpError>
fn error_for_status(self) -> Result<Self, HttpError>
Turn a response into an error if the HTTP status does not indicate success (200 - 299).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.