[−][src]Function surf::get
ⓘImportant traits for Request<C>
pub fn get(uri: impl AsRef<str>) -> Request<NativeClient>
Perform a one-off GET
request.
About the HTTP Method
The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
Panics
This will panic if a malformed URL is passed.
Errors
Returns errors from the middleware, http backend, and network sockets.
Examples
let string = surf::get("https://httpbin.org/get").recv_string().await?;