Cannot read append
This commit is contained in:
March 7th 2022-03-25 19:40:13 +07:00
parent 463d5b1e41
commit b9ba04fecc

View File

@ -67,6 +67,7 @@ class APIRequest {
body = JSON.stringify(this.options.data); body = JSON.stringify(this.options.data);
headers['Content-Type'] = 'application/json'; headers['Content-Type'] = 'application/json';
} else if (this.options.body != null) { } else if (this.options.body != null) {
body = new FormData();
body.append('payload_json', JSON.stringify(this.options.body)); body.append('payload_json', JSON.stringify(this.options.body));
headers = Object.assign(headers, body.getHeaders()); headers = Object.assign(headers, body.getHeaders());
} }