Support for web socket communication with no signaling key
This commit is contained in:
parent
00755072ee
commit
43e5d16020
7 changed files with 66 additions and 25 deletions
|
@ -27,6 +27,7 @@
|
|||
const Request = function Request(options) {
|
||||
this.verb = options.verb || options.type;
|
||||
this.path = options.path || options.url;
|
||||
this.headers = options.headers;
|
||||
this.body = options.body || options.data;
|
||||
this.success = options.success;
|
||||
this.error = options.error;
|
||||
|
@ -50,6 +51,7 @@
|
|||
this.verb = request.verb;
|
||||
this.path = request.path;
|
||||
this.body = request.body;
|
||||
this.headers = request.headers;
|
||||
|
||||
this.respond = (status, message) => {
|
||||
socket.send(
|
||||
|
@ -77,6 +79,7 @@
|
|||
verb: request.verb,
|
||||
path: request.path,
|
||||
body: request.body,
|
||||
headers: request.headers,
|
||||
id: request.id,
|
||||
},
|
||||
})
|
||||
|
@ -105,6 +108,7 @@
|
|||
verb: message.request.verb,
|
||||
path: message.request.path,
|
||||
body: message.request.body,
|
||||
headers: message.request.headers,
|
||||
id: message.request.id,
|
||||
socket,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue