public JSONObject getJsonObject(String endpoint) throws IOException {
        String res = this.get(endpoint, null, null);
        try {
            return new JSONObject(res);
        } catch (JSONException ex) {
            LOG.warn(res);
            throw ex;
        }
    }
public JSONObject getJsonObject ( String endpoint ) throws IOException { String res = this . get ( endpoint , null , null ) ; try { return new JSONObject ( res ) ; } catch ( JSONException ex ) { LOG . warn ( res ) ; throw ex ; } }
Issues HTTP GET request, converts response body to a JSON object.

@param endpoint endpoint of request url

@return response body to a JSON object

@throws IOException in case of any IO related issue