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).
Object Safety§
This trait is not object safe.