AnsweredAssumed Answered

How can I get a JSON response to a submitJob operation using Java?

Question asked by yo_haha on Dec 2, 2013
Latest reply on Dec 2, 2013 by yo_haha

I'm trying to get the JSON response of the submitJob operation launched by a restful call: http://<gp-task-url>/submitJob.
I'm using Java7.

The response I'm getting is an HTML response, using the code below:

URL url = new URL("http://<gp-task-url>/submitJob");     HttpURLConnection connection = (HttpURLConnection) url    .openConnection();  connection.setRequestProperty("Content-Type", "application/json");   connection.setRequestMethod("GET");    InputStream is = connection.getInputStream();


Do you have any idea on how to retrieve a JSON response?