private JSONObject fetchJson(List<NameValuePair> urlParameters, String azkabanUrl) {
    HttpPost httpPost = new HttpPost(azkabanUrl);
    try {
      httpPost.setEntity(new UrlEncodedFormEntity(urlParameters, "UTF-8"));
    } catch (UnsupportedEncodingException e) {
      e.printStackTrace();
    }
    httpPost.setHeader("Accept", "*/*");
    httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded");

    HttpClient httpClient = new DefaultHttpClient();
    JSONObject jsonObj = null;
    try {
      SSLSocketFactory socketFactory = new SSLSocketFactory(new TrustStrategy() {
        @Override
        public boolean isTrusted(X509Certificate[] x509Certificates, String s)
            throws CertificateException {
          return true;
        }
      });

      Scheme scheme = new Scheme("https", 443, socketFactory);
      httpClient.getConnectionManager().getSchemeRegistry().register(scheme);
      HttpResponse response = httpClient.execute(httpPost);

      if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
        throw new RuntimeException(
            response.getStatusLine().toString() + "\nStatus code: " + response.getStatusLine().getStatusCode());
      }

      String result = parseContent(response.getEntity().getContent());
      try {
        jsonObj = new JSONObject(result);
        if (jsonObj.has("error")) {
          throw new RuntimeException(jsonObj.get("error").toString());
        }
      } catch (JSONException e) {
        e.printStackTrace();
      }
    } catch (ClientProtocolException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    } catch (NoSuchAlgorithmException e) {
      e.printStackTrace();
    } catch (UnrecoverableKeyException e) {
      e.printStackTrace();
    } catch (KeyManagementException e) {
      e.printStackTrace();
    } catch (KeyStoreException e) {
      e.printStackTrace();
    } finally {
      httpClient.getConnectionManager().shutdown();
    }
    return jsonObj;
  }
Makes REST API Call for given url parameters and returns the json object

@param urlParameters
@return Json Object in the response body
app/com/linkedin/drelephant/clients/azkaban/AzkabanWorkflowClient.java