Support container output format

This commit is contained in:
Dominik Werder
2024-12-04 12:15:51 +01:00
parent aeefe566b7
commit e7613d6864
6 changed files with 28 additions and 19 deletions

View File

@@ -228,7 +228,7 @@ async fn binned_json_single(
let ret = response(StatusCode::OK)
.header(CONTENT_TYPE, APP_JSON)
.header(HEADER_NAME_REQUEST_ID, ctx.reqid())
.body(ToJsonBody::from(&item).into_body())?;
.body(ToJsonBody::from(item.into_bytes()).into_body())?;
Ok(ret)
}
CollectResult::Timeout => {

View File

@@ -253,7 +253,7 @@ async fn plain_events_json(
let ret = response(StatusCode::OK)
.header(CONTENT_TYPE, APP_JSON)
.header(HEADER_NAME_REQUEST_ID, ctx.reqid())
.body(ToJsonBody::from(&item).into_body())?;
.body(ToJsonBody::from(item.into_bytes()).into_body())?;
debug!("{self_name} response created");
Ok(ret)
}