[][src]Function reqwest::blocking::get

pub fn get<T: IntoUrl>(url: T) -> 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.


let body = reqwest::blocking::get("https://www.rust-lang.org")?


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