String nameOfCustomCodeService = "HelloWorld";
JSONObject jsonBody = new JSONObject();
jsonBody.put("name", "John");
jsonBody.put("age", "30");
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CustomCodeService customCodeService = api.buildCustomCodeService();
JSONObject jsonResponse = customCodeService.runJavaCode(nameOfCustomCodeService, jsonBody);
String nameOfCustomCodeService = "HelloWorld";
JObject jsonBody = new JObject();
jsonBody.Add("name", "John");
jsonBody.Add("age", "30");
App42Callback requestCallback = this; /* This function used the App42Callback interface */
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CustomCodeService customCodeService = api.BuildCustomCodeService();
customCodeService.RunJavaCode(nameOfCustomCodeService, jsonBody, requestCallback);
OnSuccess(Object obj)
{
JObject json = (JObject) obj;
String jsonResponse = JObject.ToString();
}
public class CallBack : App42Callback
{
public override void OnSuccess(Object obj)
{
JObject json = (JObject) obj;
//Do whatever you want with the object
}
public override void OnException(App42Exception e)
{
//Do whatever you want with the exception
}
}
String nameOfCustomCodeService = "HelloWorld";
JSONObject jsonBody = new JSONObject();
jsonBody.put("name", "John");
jsonBody.put("age", "30");
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CustomCodeService customCodeService = api.buildCustomCodeService();
JSONObject jsonResponse = customCodeService.runJavaCode(nameOfCustomCodeService, jsonBody);
String nameOfCustomCodeService = "HelloWorld";
JSONObject jsonBody = new JSONObject();
jsonBody.put("name", "John");
jsonBody.put("age", "30");
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CustomCodeService customCodeService = api.buildCustomCodeService();
JSONObject jsonResponse = customCodeService.runJavaCode(nameOfCustomCodeService, jsonBody);
String nameOfCustomCodeService = "HelloWorld";
JObject jsonBody = new JObject();
jsonBody.Add("name", "John");
jsonBody.Add("age", "30");
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CustomCodeService customCodeService = api.BuildCustomCodeService();
JObject jsonResponse = customCodeService.RunJavaCode(nameOfCustomCodeService, jsonBody);