@@ -4,7 +4,7 @@ const debug = require('debug')('dataparty.comms.rest')
44
55const dataparty_crypto = require ( '@dataparty/crypto' )
66
7- const WebsocketComms = require ( './websocket-comms' )
7+ // const WebsocketComms = require('./old- websocket-comms')
88const AuthError = require ( '../errors/auth-error' )
99
1010
@@ -132,8 +132,8 @@ class RestComms extends EventEmitter {
132132
133133 let reply
134134 try {
135- const str = await RestComms . HttpPost ( fullPath , content )
136- reply = JSON . parse ( str )
135+ reply = await RestComms . HttpPost ( fullPath , content )
136+ // reply = JSON.parse(str)
137137
138138 // debug('raw reply ->', reply)
139139 } catch ( error ) {
@@ -203,7 +203,7 @@ class RestComms extends EventEmitter {
203203 const serverIdentity = await RestComms . HttpGet ( this . uri + `${ this . uriPrefix } identity` )
204204 debug ( 'server identity - ' , serverIdentity )
205205
206- this . remoteIdentity = dataparty_crypto . Identity . fromString ( serverIdentity )
206+ this . remoteIdentity = new dataparty_crypto . Identity ( serverIdentity )
207207 }
208208
209209 return this . remoteIdentity
@@ -325,6 +325,7 @@ class RestComms extends EventEmitter {
325325 }
326326 }
327327
328+ /*
328329 async websocket(reuse = true) {
329330 if (reuse && this.websocketComm && this.websocketComm.connected) {
330331 return this.websocketComm
@@ -349,7 +350,7 @@ class RestComms extends EventEmitter {
349350
350351 return comm.authorized()
351352 })
352- }
353+ }*/
353354
354355 static async HttpRequest ( verb , url , data ) {
355356
0 commit comments