@@ -150,47 +150,6 @@ class ksqljs {
150
150
console . error ( error ) ;
151
151
throw new ksqlDBError ( error ) ;
152
152
} ) ;
153
- // return new Promise((resolve, reject) => {
154
- // const session = http2.connect(
155
- // this.ksqldbURL,
156
- // this.httpsAgentHttp2 ? this.httpsAgentHttp2 : {}
157
- // );
158
-
159
- // session.on("error", (err) => reject(err));
160
-
161
- // const req = session.request(
162
- // this.secret && this.API ?
163
- // {
164
- // ":path": "/ksql",
165
- // ":method": "POST",
166
- // "Authorization": this.API && this.secret ? `Basic ${Buffer.from(this.API + ":" + this.secret, 'utf8').toString('base64')}` : '',
167
- // }
168
- // :
169
- // {
170
- // ":path": "/ksql",
171
- // ":method": "POST",
172
- // }
173
- // );
174
-
175
- // const query = builder.build("TERMINATE ?;", queryId);
176
-
177
- // const reqBody = {
178
- // sql: query,
179
- // Accept: "application/json, application/vnd.ksqlapi.delimited.v1",
180
- // };
181
-
182
- // req.write(JSON.stringify(reqBody), "utf8");
183
- // req.end();
184
- // req.setEncoding("utf8");
185
-
186
- // req.on("data", (data) => {
187
- // console.log("Here's the response", data);
188
- // resolve();
189
- // });
190
-
191
- // req.on("end", () => {
192
- // session.close() });
193
- // })
194
153
}
195
154
196
155
/**
@@ -412,6 +371,7 @@ class ksqljs {
412
371
return axios . post ( this . ksqldbURL + '/ksql' , { ksql : query } )
413
372
. catch ( error => console . log ( error ) ) ;
414
373
}
374
+
415
375
/**
416
376
* Inserts rows of data into a stream.
417
377
*
0 commit comments