Makes an async HTTP Request to #BASE_URL. @param endpoint The endpoint of the API. @param callback The Callback.
(String endpoint, final HttpResponseCallback callback)
| 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 | } |