Skip to content

Commit

Permalink
Clarify the documentation to show that get will fail if the total dow…
Browse files Browse the repository at this point in the history
…nload time is exceeded (#1762)

Co-authored-by: Ryan <ryan@ryanj.net>
  • Loading branch information
TurnOfACard and Ryan committed Mar 1, 2023
1 parent bb8fec4 commit c2ac875
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/blocking/mod.rs
Expand Up @@ -98,11 +98,12 @@ pub use self::response::Response;
///
/// 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
/// - the native TLS backend cannot be initialized,
/// - the supplied `Url` cannot be parsed,
/// - there was an error while sending request,
/// - a redirect loop was detected,
/// - the redirect limit was exhausted, or
/// - the total download time exceeds 30 seconds.
pub fn get<T: crate::IntoUrl>(url: T) -> crate::Result<Response> {
Client::builder().build()?.get(url).send()
}

0 comments on commit c2ac875

Please sign in to comment.