summaryrefslogtreecommitdiff
path: root/src/api.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api.ts')
-rw-r--r--src/api.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api.ts b/src/api.ts
index 2cf8488106..1704b6e462 100644
--- a/src/api.ts
+++ b/src/api.ts
@@ -19,6 +19,7 @@ export type FetchLike = (input: string, init?: {
body?: string;
credentials?: RequestCredentials;
cache?: RequestCache;
+ headers: {[key in string]: string}
}) => Promise<{
status: number;
json(): Promise<any>;
@@ -75,6 +76,9 @@ export class APIClient {
...params,
i: credential !== undefined ? credential : this.credential,
}),
+ headers: {
+ 'Content-Type': 'application/json',
+ },
credentials: 'omit',
cache: 'no-cache',
}).then(async (res) => {