Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
hook: adding of hook feature for requests
[src/app-framework-binder.git]
/
test
/
AFB.js
diff --git
a/test/AFB.js
b/test/AFB.js
index
ae2fd8b
..
c77e5e6
100644
(file)
--- a/
test/AFB.js
+++ b/
test/AFB.js
@@
-42,7
+42,13
@@
var AFB_websocket;
var PROTO1 = "x-afb-ws-json1";
AFB_websocket = function(onopen, onabort) {
var PROTO1 = "x-afb-ws-json1";
AFB_websocket = function(onopen, onabort) {
- this.ws = new WebSocket(urlws, [ PROTO1 ]);
+ var u = urlws;
+ if (AFB_context.token) {
+ u = u + '?x-afb-token=' + AFB_context.token;
+ if (AFB_context.uuid)
+ u = u + '&x-afb-uuid=' + AFB_context.uuid;
+ }
+ this.ws = new WebSocket(u, [ PROTO1 ]);
this.pendings = {};
this.awaitens = {};
this.counter = 0;
this.pendings = {};
this.awaitens = {};
this.counter = 0;