MCPcopy Create free account
hub / github.com/pywebio/PyWebIO / pull

Method pull

webiojs/src/session.ts:221–238  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

219 }
220
221 pull() {
222 let that = this;
223 $.ajax({
224 type: "GET",
225 url: `${this.api_url}&ack=${this._executed_command_msg_id}`,
226 contentType: "application/json; charset=utf-8",
227 dataType: "json",
228 headers: {"webio-session-id": this.webio_session_id},
229 success: function (data: { commands: Command[][], seq: number, event: number, ack: number },
230 textStatus: string, jqXHR: JQuery.jqXHR) {
231 safe_poprun_callbacks(that._session_create_callbacks, 'session_create_callback');
232 that._on_request_success(data, textStatus, jqXHR);
233 if (that.webio_session_id.startsWith("NEW-")) {
234 that.webio_session_id = that.webio_session_id.substring(4);
235 }
236 }
237 })
238 }
239
240 private _on_request_success(data: { commands: Command[][], seq: number, ack: number },
241 textStatus: string, jqXHR: JQuery.jqXHR) {

Callers 2

start_sessionMethod · 0.95
change_pull_intervalMethod · 0.95

Calls 2

safe_poprun_callbacksFunction · 0.85
_on_request_successMethod · 0.80

Tested by

no test coverage detected