James11
1
Hi All,
In javascript, I need to pass the url to kdb for establishing the connection.
function connect_kdb(){
if (“WebSocket” in window)
{
ws = new WebSocket(“ws://127.0.0.1:6000”);
ws.binaryType = ‘arraybuffer’;
ws.onopen=onopen;
ws.onclose=onclose;
ws.onmessage=onmessage;
ws.onerror=onerror;
}
else {
alert(“WebSockets not supported on your browser.”);
}
}
how to add username and password of kdb to web socket url?
The following format does NOT work.
ws = new WebSocket(“ws://127.0.0.1:6000:username:password”);
Roy Liu
jim11
2
effbiae
3
James11
5
It works: ws://username:password@127.0.0.1:6000
Furthermore, the issue has fixed in Google Chrome.
It doesn’t work for me.
When I try to open a websocket with ws://username:password@127.0.0.1:6000 as URL, and define .z.pw as
.z.pw:{[u;p] show u; show p; 1b}
it does open the connection but print
q)“”`
I tried with the latest q version (KDB+ 3.3 2016.02.22) and both Chrome and Firefox.
Le vendredi 26 février 2016 02:09:07 UTC+1, Roy a écrit :
It works: ws://username:password@127.0.0.1:6000
Furthermore, the issue has fixed in Google Chrome.