use of com.reprezen.kaizen.oasparser.model3.RequestBody in project C3 by Hi5App.
the class HttpUtilsCheckArbor method getArborUrl.
public static void getArborUrl(String arborName, int xc, int yc, int zc, String imageId, String url, Callback callback) {
try {
RequestBody body = RequestBody.create(JSON, String.valueOf(new JSONObject().put("arborName", arborName).put("xc", xc).put("yc", yc).put("zc", zc).put("imageId", imageId).put("url", url)));
asyncPostRequest(GET_CHECK_INFOS_URL, body, callback);
} catch (Exception e) {
e.printStackTrace();
}
}
use of com.reprezen.kaizen.oasparser.model3.RequestBody in project C3 by Hi5App.
the class HttpUtilsImage method getBrainListWithOkHttp.
public static void getBrainListWithOkHttp(JSONObject userInfo, Callback callback) {
try {
// set for query parameters on server, default value: off=0, limit=2000
JSONObject queryCondition = new JSONObject().put("off", 0).put("limit", 2000);
RequestBody body = RequestBody.create(JSON, String.valueOf(new JSONObject().put("user", userInfo).put("condition", queryCondition)));
asyncPostRequest(URL_GET_BRAIN_LIST, body, callback);
} catch (Exception e) {
e.printStackTrace();
}
}
use of com.reprezen.kaizen.oasparser.model3.RequestBody in project C3 by Hi5App.
the class HttpUtilsImage method downloadImageWithOkHttp.
/**
* download image block
* @param userInfo username & password
* @param bBox info of Bounding Box, include startPos, endPos, resolution, brainId
* @param callback the callback func
*/
public static void downloadImageWithOkHttp(JSONObject userInfo, JSONObject bBox, Callback callback) {
try {
RequestBody body = RequestBody.create(JSON, String.valueOf(new JSONObject().put("bb", bBox).put("user", userInfo)));
asyncPostRequest(URL_DOWNLOAD_IMAGE, body, callback);
} catch (Exception e) {
e.printStackTrace();
}
}
use of com.reprezen.kaizen.oasparser.model3.RequestBody in project C3 by Hi5App.
the class HttpUtilsImage method getNeuronListWithOkHttp.
public static void getNeuronListWithOkHttp(String username, String password, String brain_id, Callback callback) {
try {
RequestBody body = RequestBody.create(JSON, String.valueOf(new JSONObject().put("name", username).put("password", password).put("brain_id", brain_id)));
asyncPostRequest(URL_GET_NEURON_LIST, body, callback);
} catch (Exception e) {
e.printStackTrace();
}
}
use of com.reprezen.kaizen.oasparser.model3.RequestBody in project C3 by Hi5App.
the class HttpUtilsImage method getAnoListWithOkHttp.
public static void getAnoListWithOkHttp(String username, String password, String neuron_id, Callback callback) {
try {
RequestBody body = RequestBody.create(JSON, String.valueOf(new JSONObject().put("name", username).put("password", password).put("neuron_id", neuron_id)));
asyncPostRequest(URL_GET_ANO_LIST, body, callback);
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations