feat: add content-type header

This commit is contained in:
Michel Jonathan Schmitz
2020-05-13 08:47:21 +02:00
parent e0ee3258e4
commit d30de896f0

View File

@@ -102,11 +102,12 @@ export class Client {
// cut trailing slash if needed
this.url = this.url.replace(/\/$/, '');
this.headers = {
'Content-Type': 'application/json',
};
if (typeof version === 'string') {
// set header to tell proxy to select the correct backend
this.headers = {
'X-StApps-Version': this.version,
};
this.headers['X-StApps-Version'] = this.version;
}
}