Added missing "Errors" sections to client.rs and lib.rs

This commit is contained in:
Michal Budzynski
2017-06-04 04:14:04 +02:00
parent e8eb341e17
commit 026dca2512
2 changed files with 66 additions and 3 deletions

View File

@@ -208,6 +208,16 @@ mod response;
/// # }
/// # }
/// ```
///
/// # Errors
///
/// This function fails if:
///
/// - native TLS backend cannot be initialized
/// - supplied `Url` cannot be parsed
/// - there was an error while sending request
/// - redirect loop was detected
/// - redirect limit was exhausted
pub fn get<T: IntoUrl>(url: T) -> ::Result<Response> {
Client::new()?
.get(url)?