pub async fn create_user(&self, user: &User) -> Result<()> {
        let path = "/users";
        let resp = self.build_request(Method::POST, path).json(user).send().await?;
        if resp.status().eq(&StatusCode::CREATED) {
            Ok(())
        } else {
            Err(anyhow!("failed to create user: {}", resp.text().await?))
        }
    }
/// Creates a new user account.
Creates a new user account.
Creates a new user account .
pub async fn create_user(&self, user: &User) -> Result<()> {
        let path = "/users";
        let resp = self.build_request(Method::POST, path).json(user).send().await?;
        if resp.status().eq(&StatusCode::CREATED) {
            Ok(())
        } else {
            Err(anyhow!("failed to create user: {}", resp.text().await?))
        }
    }
pub async fn create_user ( & self , user : & User ) -> Result < ( ) > { let path = " " ; let resp = self . build_request ( Method :: POST , path ) . json ( user ) . send ( ) . await ? ; if resp . status ( ) . eq ( & StatusCode :: CREATED ) { Ok ( ( ) ) } else { Err ( anyhow ! ( " " resp text ( ) await ) ) } }
Creates a new user account.
Creates a new user account .
&self
user
&User
&self
user
&User