Sets the Server base URL, without the trailing slash.
(url: string)
| 291 | |
| 292 | /** Sets the Server base URL, without the trailing slash. */ |
| 293 | setServerUrl(url: string): void { |
| 294 | tryValidURL(url); |
| 295 | if (url.substr(-1) == '/') { |
| 296 | throw Error('baseUrl should not have a trailing slash'); |
| 297 | } |
| 298 | this.serverUrl = url; |
| 299 | // TODO This is not the right place |
| 300 | this.setWebSocket(); |
| 301 | } |
| 302 | |
| 303 | // TODO: don't do this, have one websocket per domain |
| 304 | /** Closes an old websocket and opens a new one to the BaseURL */ |
no test coverage detected