Skip to content

Commit 72a5536

Browse files
committed
feat(client): Add convenience method for sending DELETE requests
1 parent bb00275 commit 72a5536

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/client/client/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,16 @@ impl Client {
14541454
self.request(Method::HEAD, url)
14551455
}
14561456

1457+
/// Convenience method to make a `OPTIONS` request to a URL.
1458+
///
1459+
/// # Errors
1460+
///
1461+
/// This method fails whenever the supplied `Url` cannot be parsed.
1462+
#[inline]
1463+
pub fn options<U: IntoUrl>(&self, url: U) -> RequestBuilder {
1464+
self.request(Method::OPTIONS, url)
1465+
}
1466+
14571467
/// Start building a `Request` with the `Method` and `Url`.
14581468
///
14591469
/// Returns a `RequestBuilder`, which will allow setting headers and

0 commit comments

Comments
 (0)