[−][src]Function surf::put
pub fn put(uri: impl AsRef<str>) -> Request<Client>
Perform a one-off PUT
request.
About the HTTP Method
The HTTP PUT request method creates a new resource or replaces a representation of the target resource with the request payload.
The difference between PUT and POST is that PUT is idempotent: calling it once or several times successively has the same effect (that is no side effect), where successive identical POST may have additional effects, like passing an order several times.
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::put("https://httpbin.org/put").recv_string().await?;