set content type header

This commit is contained in:
Trym Lund Flogard 2021-06-05 13:34:52 +02:00
parent a5df11eaca
commit 4ab7fcecfe
3 changed files with 5 additions and 3 deletions

3
dist/index.js vendored
View File

@ -626,7 +626,8 @@ class NextcloudClient {
const res = await node_fetch_1.default(url, {
method: 'POST',
headers: Object.assign(this.headers, {
'OCS-APIRequest': true
'OCS-APIRequest': true,
'Content-Type': 'application/json'
}),
body: JSON.stringify(body)
});

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -187,7 +187,8 @@ export class NextcloudClient {
const res = await fetch(url, {
method: 'POST',
headers: Object.assign(this.headers, {
'OCS-APIRequest': true
'OCS-APIRequest': true,
'Content-Type': 'application/json'
}),
body: JSON.stringify(body)
})