code: public static JSONObject getJSONObject(HttpGet request, Integer method, HashMap<String, String> params) throws JSONException {
          switch (method) {
          case METHOD_GET:
              return doGetRequest(request);
          default:
              throw new RuntimeException("Wrong http method requested");
          }
      }
docs: Get JSON response for GET
  
  @param   request Request object for GET
  @param   method HTTP method
  @param   params POST parameters
  @throws  JSONException
  @return  {@link JSONObject}