Function mio_surf::options[][src]

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

Notable traits for RequestBuilder

impl Future for RequestBuilder type Output = Result<Response>;

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?;