hotfix: 0-length POST request on enrollment
This commit is contained in:
parent
47fd5b2d93
commit
e7828df6ea
|
@ -3633,7 +3633,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "trifid-api"
|
name = "trifid-api"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-cors",
|
"actix-cors",
|
||||||
"actix-request-identifier",
|
"actix-request-identifier",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tfcli"
|
name = "tfcli"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Command-line client for managing trifid-api"
|
description = "Command-line client for managing trifid-api"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
|
|
|
@ -375,7 +375,7 @@ pub async fn enroll_host(id: String, server: Url) -> Result<(), Box<dyn Error>>
|
||||||
|
|
||||||
let token = format!("{} {}", session_token, auth_token);
|
let token = format!("{} {}", session_token, auth_token);
|
||||||
|
|
||||||
let res = client.post(server.join(&format!("/v1/hosts/{}/enrollment-code", id))?).bearer_auth(token).send().await?;
|
let res = client.post(server.join(&format!("/v1/hosts/{}/enrollment-code", id))?).header("content-length", 0).bearer_auth(token).send().await?;
|
||||||
|
|
||||||
if res.status().is_success() {
|
if res.status().is_success() {
|
||||||
let resp: EnrollmentResponse = res.json().await?;
|
let resp: EnrollmentResponse = res.json().await?;
|
||||||
|
|
Loading…
Reference in New Issue