taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 0d81c2270882816b4ab1f945f91a25b815f595a0
parent c5f484d18a89bd6cda0c7a89eea5ee9d7fe4ba09
Author: ms <ms@taler.net>
Date:   Sat, 23 Apr 2022 17:44:29 +0200

fix WebEx Content-Type, after Sebastian suggestion

Diffstat:
Mpackages/taler-wallet-webextension/src/browserHttpLib.ts | 1+
Mpackages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts | 3+++
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 @@ -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 @@ -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, });