[−][src]Trait extrahop::ApiResponse
Validator and deserializer for REST API responses.
Required methods
fn validate_status(self) -> Result<Response>
Checks if the status code returned was in the 2xx range. If so, returns the underlying response for further processing; otherwise returns an error.
fn deserialize<T: DeserializeOwned>(self) -> Result<T>
Attempts to parse the response as JSON into T
.
Provided methods
fn validate_and_read<T: DeserializeOwned>(self) -> Result<T>
Validates the status code and attempts to deserialize into T
in one step.