|
@@ -19,6 +19,9 @@ export default class WebClientNode implements IWebClient {
|
|
|
}
|
|
}
|
|
|
if (options.body) {
|
|
if (options.body) {
|
|
|
options.headers['content-type'] = 'application/json';
|
|
options.headers['content-type'] = 'application/json';
|
|
|
|
|
+ if (typeof options.body === 'object') {
|
|
|
|
|
+ options.body = JSON.stringify(options.body);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
options.headers.accept = 'application/json';
|
|
options.headers.accept = 'application/json';
|
|
|
return JSON.parse(await this.request(options));
|
|
return JSON.parse(await this.request(options));
|