use new api

This commit is contained in:
lxsang
2019-08-30 13:20:10 +02:00
parent 8288379482
commit 96e7662d6e
2 changed files with 3 additions and 5 deletions

View File

@ -270,14 +270,13 @@
}
run() {
var me, proto, value;
var me, value;
me = this;
value = this.editor.getValue().trim();
if (!(value && value !== "")) {
return;
}
proto = window.location.protocol === "https:" ? "wss://" : "ws://";
this.socket = new WebSocket(proto + this._api.HOST + "/system/apigateway?ws=1");
this.socket = this.stream();
this.socket.onopen = function() {
//send data to server
return me.socket.send(JSON.stringify({