pub async fn parse_response<T>(
response: Response<Body>,
) -> Result<T, ProtocolError>where
T: DeserializeOwned,
Expand description
Deserializes the body of HttpResponse<Body>
into T
.
Returns a “bad request” error if JSON deserialization fails,
and returns an “internal” error if raw data retrieval from the request fails.
Can be useful for implementing ResponseHttpConvert::from_http_response
.