Merge pull request #138 from budziq/error_docs_update

Error docs update
This commit is contained in:
Sean McArthur
2017-06-03 23:21:59 -07:00
committed by GitHub
4 changed files with 88 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)?