diff --git a/tfcli/Cargo.toml b/tfcli/Cargo.toml index 02e501e..008828e 100644 --- a/tfcli/Cargo.toml +++ b/tfcli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tfcli" -version = "0.1.4" +version = "0.1.5" edition = "2021" description = "Command-line client for managing trifid-api" license = "GPL-3.0-or-later" diff --git a/tfcli/src/host.rs b/tfcli/src/host.rs index a4f6d90..8a1ebca 100644 --- a/tfcli/src/host.rs +++ b/tfcli/src/host.rs @@ -405,7 +405,7 @@ pub async fn block_host(id: String, server: Url) -> Result<(), Box> { let token = format!("{} {}", session_token, auth_token); - let res = client.post(server.join(&format!("/v1/hosts/{}/block", id))?).bearer_auth(token).send().await?; + let res = client.post(server.join(&format!("/v1/hosts/{}/block", id))?).header("Content-Length", "0").bearer_auth(token).send().await?; if res.status().is_success() { println!("Host blocked. To unblock it, re-enroll the host.");