pub fn get(uri: impl AsRef<str>) -> RequestBuilder
Expand description
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?;