Don't panic if the client builder fails (#398)

This commit is contained in:
Kornel
2018-12-13 21:44:47 +00:00
committed by Sean McArthur
parent a13f89c4e5
commit 559f9634bc

View File

@@ -253,7 +253,8 @@ pub mod async {
/// - redirect loop was detected
/// - redirect limit was exhausted
pub fn get<T: IntoUrl>(url: T) -> ::Result<Response> {
Client::new()
Client::builder()
.build()?
.get(url)
.send()
}