504 gateway timeout is not a timeout
let response = gen_504_response();
let response = response.error_for_status().map_err(|e| e.is_timeout())
assert_eq!(response, Result::Err(true));
this currently panics, i would expect a gateway timeout to be a timeout.
Hm, that's an interesting idea. I'd never thought about it. So far, is_timeout() means one of the ClientBuilder::*_timeout() options was the cause of the failure.
then maybe it should be renamed to is_client_timeout, and/or the conversion of status to error should be removed? maybe thats too drastic.
one semi-related thing: its a bit of a footgun that requests return Response instead of some kind of Result<Response>, or at least (status, response). makes it very easy to accidentally ignore errors, or rather the api does not guide you through the semantics like it usually does in rust.