CLIページにおいてAPIリクエスト時にContent-Typeヘッダを付与するように変更 (#9887)
This commit is contained in:
parent
f6f269194f
commit
ef860a8f84
1 changed files with 3 additions and 0 deletions
|
@ -11,6 +11,9 @@ window.onload = async () => {
|
||||||
|
|
||||||
// Send request
|
// Send request
|
||||||
fetch(endpoint.indexOf('://') > -1 ? endpoint : `/api/${endpoint}`, {
|
fetch(endpoint.indexOf('://') > -1 ? endpoint : `/api/${endpoint}`, {
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
credentials: 'omit',
|
credentials: 'omit',
|
||||||
|
|
Loading…
Reference in a new issue