public void postImage(URL url, HashMap hashmap, String s, String s1, byte abyte0[]) { if (isConnected()) { url = new Request(RestUtil.preparePostUrl("http://IP_ADDRESS:PORT/ws/app/WIDGET_ID/queue", url, "interactivity_Button_label"), "POST", "image/png"); url.addHeaders(hashmap); url.makeFileRequest(s1); _requestExecuter.execute(url, 9002, _onRequestCallbackListener); return; } else { Log.w("RestClient", "Application not connected!"); return; } }
public void get(URL url, HashMap hashmap, String s) { if (isConnected()) { url = new Request(RestUtil.prepareGetUrl("http://IP_ADDRESS:PORT/ws/app/WIDGET_ID/queue/device/DEVICE_ID", url, "interactivity_Button_label", DeviceInfo.getDeviceId()), "GET", true); url.addHeaders(hashmap); url.addBody(s); _requestExecuter.execute(url, 9003, _onRequestCallbackListener); return; } else { Log.w("RestClient", "Application not connected!"); return; } }