Skip to content

Instantly share code, notes, and snippets.

@miguelcardo
Created November 27, 2014 15:47
Show Gist options
  • Save miguelcardo/2329350d54e51b19d852 to your computer and use it in GitHub Desktop.
Save miguelcardo/2329350d54e51b19d852 to your computer and use it in GitHub Desktop.
Check operationId, store in map
BufferedReader inputReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = inputReader.readLine()) != null) {
response.append(inputLine);
}
inputReader.close();
JSONObject jsonResponse = (JSONObject) JSONValue.parse(response.toString());
String operationId = (String) jsonResponse.get("operationId");
pendingOperations.put(operationId, sessionId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment