reqwest
reqwest copied to clipboard
provide client wide config for `error_for_status`
It'd be awesome, to have a configuration in the ClientBuilder, to error by default for all responses with an invalid status code.
let client = Client::builder()
.error_for_status(true)
.build()?;
client.get("https://www.google.com/idontexist").send().await?; // this should error
Some discussion about implementing this is happening on PR #875