add the content type in the webhook + improve the test

This commit is contained in:
Tamo 2024-02-28 15:53:01 +01:00
parent f4a6261dea
commit b130917933
2 changed files with 15 additions and 3 deletions

View file

@ -1395,7 +1395,9 @@ impl IndexScheduler {
// let reader = GzEncoder::new(BufReader::new(task_reader), Compression::default());
let reader = GzEncoder::new(BufReader::new(task_reader), Compression::default());
let request = ureq::post(url).set("Content-Encoding", "gzip");
let request = ureq::post(url)
.set("Content-Encoding", "gzip")
.set("Content-Type", "application/x-ndjson");
let request = match &self.webhook_authorization_header {
Some(header) => request.set("Authorization", header),
None => request,