MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / get

Method get

The 5zig Mod/src/eu/the5zig/mod/util/APIManager.java:21–27  ·  view source on GitHub ↗

Makes an async HTTP Request to #BASE_URL. @param endpoint The endpoint of the API. @param callback The Callback.

(String endpoint, final HttpResponseCallback callback)

Source from the content-addressed store, hash-verified

19 * @param callback The Callback.
20 */
21 protected void get(String endpoint, final HttpResponseCallback callback) throws Exception {
22 if (NetworkManager.CLIENT_NIO_EVENTLOOP == null) {
23 callback.call(null, 300, new RuntimeException("No NIO EventLoop"));
24 } else {
25 HttpClient.get(BASE_URL + endpoint, NetworkManager.CLIENT_NIO_EVENTLOOP, callback);
26 }
27 }
28
29}

Callers

nothing calls this directly

Calls 2

getMethod · 0.95
callMethod · 0.65

Tested by

no test coverage detected