mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 23:53:09 +02:00
application/json の content-type header をデフォルトで付与する (#52)
This commit is contained in:
parent
fc921d8c1d
commit
4f62f6f288
1 changed files with 4 additions and 0 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue