package awesomefb;

import java.io.IOException;
import java.net.URL;

import org.json.JSONException;
import org.json.JSONObject;

public class JsonReader {

    public static JSONObject readJsonFromUrl(String url) throws IOException, JSONException {
        String jsonText = org.apache.commons.io.IOUtils.toString(new URL(url).openStream());
        JSONObject json = new JSONObject(jsonText);
        return json;
    }
}

@@ -37,24 +37,57 @@
 OException;%0A
+import java.net.SocketException;%0A
 import java.
@@ -95,16 +95,16 @@
 et.URL;%0A
-
 %0Aimport 
@@ -276,16 +276,85 @@
 ption %7B%0A
+        System.out.println(%22Waiting for HTTP response from %22 + url);%0A
         
@@ -438,16 +438,71 @@
 eam());%0A
+        System.out.println(%22Received HTTP response.%22);%0A
         

Print states