Fix protocol versions

This commit is contained in:
Amish Shah
2016-08-13 16:23:24 +01:00
parent c02d7808c1
commit a2f8680514
3 changed files with 10 additions and 5 deletions

View File

@@ -30,7 +30,10 @@ class RESTMethods {
getGateway() {
return new Promise((resolve, reject) => {
this.rest.makeRequest('get', Constants.Endpoints.gateway, true)
.then(res => resolve(res.url))
.then(res => {
this.rest.client.store.gateway = `${res.url}/?encoding=json&v=${this.rest.client.options.protocol_version}`;
resolve(this.rest.client.store.gateway);
})
.catch(reject);
});
}