Function get
fn get<T: crate::IntoUrl>(url: T) -> crate::Result<Response>
Shortcut method to quickly make a blocking GET request.
NOTE: This function creates a new internal Client on each call,
and so should not be used if making many requests. Create a
Client instead.
Examples
#
#
Errors
This function fails if:
- the native TLS backend cannot be initialized,
- the supplied
Urlcannot 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.