MCPcopy Create free account
hub / github.com/FongMi/TV / requestAsync

Method requestAsync

quickjs/src/main/java/com/fongmi/quickjs/method/Global.java:182–190  ·  view source on GitHub ↗
(String url, JSObject options, JSFunction complete)

Source from the content-addressed store, hash-verified

180 }
181
182 private void requestAsync(String url, JSObject options, JSFunction complete) {
183 complete.hold();
184 try {
185 Req req = Req.objectFrom(options.stringify());
186 Connect.to(url, req).enqueue(getCallback(complete, req));
187 } catch (Throwable e) {
188 completeError(complete);
189 }
190 }
191
192 private Callback getCallback(JSFunction complete, Req req) {
193 return new Callback() {

Callers 1

_httpMethod · 0.95

Calls 4

objectFromMethod · 0.95
toMethod · 0.95
getCallbackMethod · 0.95
completeErrorMethod · 0.95

Tested by

no test coverage detected