title: How to get the JSONObject server response in Volley
body: <pre><code>protected JSONObject executeGet(String URL) throws CloudAppException {
      JSONObject response = new JSONObject();
      JsonObjectRequest req = new JsonObjectRequest(Request.Method.GET, URL, null,
              new Response.Listener&lt;JSONObject&gt;() {
                  @Override
                  public void onResponse(JSONObject serverResponse) {
                      try {
                          response = serverResponse;
                          VolleyLog.v("Response:%n %s", serverResponse.toString(4));
                      } catch (JSONException e) {
                          e.printStackTrace();
                      }
                  }
              }, new Response.ErrorListener() {
          @Override
          public void onErrorResponse(VolleyError error) {
              VolleyLog.e("Error: ", error.getMessage());
          }
      });
  
      RequestHandler.addToRequestQueue(req);
  
      return response;
  }
  </code></pre>
  
  <p>Ideally, I want to parse the response on my own, but I'm blanking on as to how to get the executeGet method to return the server response.</p>