pub(super) async fn post_users(&self, user: &User) -> crate::Result<PostUsersResponse> {
        let endpoint = format!("{}{}", self.api_url, "/users");
        let response = self
            .client
            .post(endpoint)
            .bearer_auth(&self.api_token)
            .json(&user)
            .send()
            .await?;

        Ok(response.json::<PostUsersResponse>().await?)
    }
/// Creates a POST request to `/users` to create a new user in Snipe-IT
Creates a POST request to `/users` to create a new user in Snipe-IT
Creates a POST request to ` / users ` to create a new user in Snipe - IT
pub(super) async fn post_users(&self, user: &User) -> crate::Result<PostUsersResponse> {
        let endpoint = format!("{}{}", self.api_url, "/users");
        let response = self
            .client
            .post(endpoint)
            .bearer_auth(&self.api_token)
            .json(&user)
            .send()
            .await?;
        Ok(response.json::<PostUsersResponse>().await?)
    }
pub ( super ) async fn post_users ( & self , user : & User ) -> crate :: Result < PostUsersResponse > { let endpoint = format ! ( " " self api_url " " ) ; let response = self . client . post ( endpoint ) . bearer_auth ( & self . api_token ) . json ( & user ) . send ( ) . await ? ; Ok ( response . json :: < PostUsersResponse > ( ) . await ? ) }
Creates a POST request to `/users` to create a new user in Snipe-IT
Creates a POST request to ` / users ` to create a new user in Snipe - IT
&self
user
&User