diff options
-rw-r--r-- | packages/taler-wallet-webextension/src/browserHttpLib.ts | 1 | ||||
-rw-r--r-- | packages/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 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, }); |