From eeb8b3199e846de2410d7493f6cff20150fd3672 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Mon, 5 Apr 2021 01:44:44 +0200 Subject: site: add headers for survey POST request --- site/index.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/site/index.html b/site/index.html index 1378bdf..2fc90e7 100644 --- a/site/index.html +++ b/site/index.html @@ -152,8 +152,14 @@ { type: 'application/octet-stream' } ); - fetch("/upload", {method:"POST", body:blobData}) - .then(response => console.log(response.text())) + fetch("/upload", { + method: "POST", + body: blobData, + headers: { + "X-Survey": survey.title, + "Content-Type": "text/age" + } + }).then(response => console.log(response.text())) } root.appendChild(footer); -- cgit v1.2.3