feat(xo-lib): allow passing opts to JsonRpcWebSocketClient
This commit is contained in:
@@ -13,8 +13,9 @@ export class XoError extends BaseError {}
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
export default class Xo extends JsonRpcWebSocketClient {
|
||||
constructor({ credentials, url = '.' } = {}) {
|
||||
super(`${trimEnd(url, '/')}/api/`)
|
||||
constructor({ credentials, url = '.', ...opts } = {}) {
|
||||
opts.url = `${trimEnd(url, '/')}/api/`
|
||||
super(opts)
|
||||
|
||||
this._credentials = credentials
|
||||
this._user = null
|
||||
|
||||
Reference in New Issue
Block a user