/// A helper to make a `DELETE` request of a path and collect relevant metrics.
/// Automatically prepends the correct host.
///
/// (If you need to set headers, change timeouts, or otherwise make use of the
/// [`reqwest::RequestBuilder`](https://docs.rs/reqwest/*/reqwest/struct.RequestBuilder.html)
/// object, you can instead call `swanling_delete` which returns a
/// [`RequestBuilder`](https://docs.rs/reqwest/*/reqwest/struct.RequestBuilder.html),
/// then call `swanling_send` to invoke the request.)
///
/// Calls to `delete()` return a [`SwanlingResponse`](./struct.SwanlingResponse.html) object which
/// contains a copy of the request you made ([`SwanlingRequestMetric`](./struct.SwanlingRequestMetric.html)),
/// and the response ([`reqwest::Response`](https://docs.rs/reqwest/*/reqwest/struct.Response.html)).
///
/// # Example
/// ```rust
/// use swanling::prelude::*;
///
/// let mut task = task!(delete_function);
///
/// /// A very simple task that makes a DELETE request.
/// async fn delete_function(user: &SwanlingUser) -> SwanlingTaskResult {
///     let _swanling = user.delete("/path/to/foo/").await?;
///
///     Ok(())
/// }
/// ```
A helper to make a `DELETE` request of a path and collect relevant metrics.
Automatically prepends the correct host.




A helper to make a ` DELETE ` request of a path and collect relevant metrics . Automatically prepends the correct host .
pub async fn delete(&self, path: &str) -> Result<SwanlingResponse, SwanlingTaskError> {
        let request_builder = self.swanling_delete(path).await?;
        Ok(self.swanling_send(request_builder, None).await?)
    }
pub async fn delete ( & self , path : & str ) -> Result < SwanlingResponse , SwanlingTaskError > { let request_builder = self . swanling_delete ( path ) . await ? ; Ok ( self . swanling_send ( request_builder , None ) . await ? ) }
A helper to make a `DELETE` request of a path and collect relevant metrics.
A helper to make a ` DELETE ` request of a path and collect relevant metrics .
&self
<not_specific>
path
&str
<not_specific>
example
```rust
use swanling::prelude::*.

let mut task = task!(delete_function).

A very simple task that makes a DELETE request.
async fn delete_function(user: &SwanlingUser) -> SwanlingTaskResult {
let _swanling = user.delete("/path/to/foo/").await?.


` ` ` rust use swanling :: prelude :: * . let mut task = task! ( delete_function ) . A very simple task that makes a DELETE request . async fn delete_function ( user : &SwanlingUser ) - > SwanlingTaskResult { let _swanling = user . delete ( " / path / to / foo / " ) . await? .