mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-16 19:35:14 +00:00
Fix fetch request content type (#2562)
This commit is contained in:
parent
c15ef3ca76
commit
f54cc2f853
1 changed files with 1 additions and 0 deletions
|
@ -45,6 +45,7 @@ export default class ApiClient {
|
|||
headers: {
|
||||
...(method !== 'GET' && this.csrf ? { 'X-CSRF-TOKEN': this.csrf } : {}),
|
||||
...(this.token ? { Authorization: `Bearer ${this.token}` } : {}),
|
||||
...(data ? { 'Content-Type': 'application/json' } : {}),
|
||||
},
|
||||
body: data ? JSON.stringify(data) : undefined,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue