[go: up one dir, main page]

options

Function options 

Source
pub fn options(uri: impl AsRef<str>) -> RequestBuilder 
Expand description

Perform a one-off OPTIONS request.

§About the HTTP Method

The HTTP OPTIONS method is used to describe the communication options for the target resource. The client can specify a URL for the OPTIONS method, or an asterisk (*) to refer to the entire server.

Read more on MDN

§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::options("https://httpbin.org/options").recv_string().await?;