pub async fn head_named(
        &self,
        path: &str,
        request_name: &str,
    ) -> Result<SwanlingResponse, SwanlingTaskError> {
        let request_builder = self.swanling_head(path).await?;

        Ok(self
            .swanling_send(request_builder, Some(request_name))
            .await?)
    }
/// A helper to make a named `HEAD` request of a path and collect relevant metrics.
/// Automatically prepends the correct host. Naming a request only affects collected
/// metrics.
///
/// Calls to `head_named()` 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!(head_function);
///
/// /// A very simple task that makes a HEAD request.
/// async fn head_function(user: &SwanlingUser) -> SwanlingTaskResult {
///     let _swanling = user.head_named("/path/to/foo/", "foo").await?;
///
///     Ok(())
/// }
/// ```
A helper to make a named `HEAD` request of a path and collect relevant metrics.
Automatically prepends the correct host. Naming a request only affects collected
metrics.


A helper to make a named ` HEAD ` request of a path and collect relevant metrics . Automatically prepends the correct host . Naming a request only affects collected metrics .
pub async fn head_named(
        &self,
        path: &str,
        request_name: &str,
    ) -> Result<SwanlingResponse, SwanlingTaskError> {
        let request_builder = self.swanling_head(path).await?;
        Ok(self
            .swanling_send(request_builder, Some(request_name))
            .await?)
    }
pub async fn head_named ( & self , path : & str , request_name : & str , ) -> Result < SwanlingResponse , SwanlingTaskError > { let request_builder = self . swanling_head ( path ) . await ? ; Ok ( self . swanling_send ( request_builder , Some ( request_name ) ) . await ? ) }
A helper to make a named `HEAD` request of a path and collect relevant metrics.
A helper to make a named ` HEAD ` request of a path and collect relevant metrics .
&self
path
&str
request_name
&str
example
```rust
use swanling::prelude::*.

let mut task = task!(head_function).

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


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