aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorms <ms@taler.net>2022-04-23 17:44:29 +0200
committerms <ms@taler.net>2022-04-23 17:44:40 +0200
commit0d81c2270882816b4ab1f945f91a25b815f595a0 (patch)
tree7923bf50c334d20838d71e62ab665c106268630e
parentc5f484d18a89bd6cda0c7a89eea5ee9d7fe4ba09 (diff)
fix WebEx Content-Type, after Sebastian suggestion
-rw-r--r--packages/taler-wallet-webextension/src/browserHttpLib.ts1
-rw-r--r--packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts3
2 files changed, 4 insertions, 0 deletions
diff --git a/packages/taler-wallet-webextension/src/browserHttpLib.ts b/packages/taler-wallet-webextension/src/browserHttpLib.ts
index 537d4e75d..93d4939c5 100644
--- a/packages/taler-wallet-webextension/src/browserHttpLib.ts
+++ b/packages/taler-wallet-webextension/src/browserHttpLib.ts
@@ -178,6 +178,7 @@ export class BrowserHttpLib implements HttpRequestLibrary {
): Promise<HttpResponse> {
return this.fetch(url, {
method: "POST",
+ headers: {"Content-Type": "application/json"},
body: JSON.stringify(body),
...opt,
});
diff --git a/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts b/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts
index 4dee28a6c..d07cb564d 100644
--- a/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts
+++ b/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts
@@ -84,6 +84,8 @@ export class ServiceWorkerHttpLib implements HttpRequestLibrary {
});
}
+ // FIXME: "Content-Type: application/json" goes here,
+ // after Sebastian suggestion.
postJson(
url: string,
body: any,
@@ -91,6 +93,7 @@ export class ServiceWorkerHttpLib implements HttpRequestLibrary {
): Promise<HttpResponse> {
return this.fetch(url, {
method: "POST",
+ headers: {"Content-Type": "application/json"},
body: JSON.stringify(body),
...opt,
});