SetParameters
If you want to add parameters to the querystring you can call the setParameters()
method. This have to be done nefore calling open()
.
Pass in all parameters at once. Calling setParameters()
will replace the previous parameters set.
<script>
var conn = new xsockets.client('ws://localhost:4502');
conn.setParameters({name:'Uffe',age:39});
conn.open();
</script>
The code above will create a connection looking like below
ws://localhost:4502/?name=Uffe&age=39&persistentid=9ee2592d-0bdc-49d0-8706-011fdcdd92b1