Skip to content

Commit

Permalink
ASA-8093
Browse files Browse the repository at this point in the history
Handled the URL encoding issue with staging & A360 environment.
  • Loading branch information
vishalhcl-5960 committed Feb 26, 2024
1 parent 3548805 commit 5a3c49f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ protected String getReportStatus(String reportId) throws IOException, JSONExcept
}

String request_url = authProvider.getServer() + API_REPORT_STATUS;
request_url += String.format("?$top=100&$filter=Id eq %s&$count=false",reportId);
String query = ("?%24top=100&%24filter=Id eq "+reportId+"&%24count=false").replaceAll(" ","%20");
request_url += query;
Map<String, String> request_headers = authProvider.getAuthorizationHeader(true);
request_headers.put(CONTENT_LENGTH, "0"); //$NON-NLS-1$

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ public JSONObject getScanDetails(String scanId) throws IOException, JSONExceptio
return null;

String request_url = m_authProvider.getServer() + API_BASIC_DETAILS;
request_url +=String.format("?$filter=Id eq %s",scanId);
String query = ("?$filter=Id eq "+scanId).replaceAll(" ", "%20");
request_url += query;
Map<String, String> request_headers = m_authProvider.getAuthorizationHeader(true);

HttpClient client = new HttpClient(m_authProvider.getProxy(), m_authProvider.getacceptInvalidCerts());
Expand Down Expand Up @@ -179,7 +180,8 @@ public JSONArray getNonCompliantIssues(String scanId) throws IOException, JSONEx
return null;

String request_url = m_authProvider.getServer() + String.format(API_ISSUES_COUNT, "Scan", scanId);
request_url +="?$apply=groupby((Severity),aggregate($count as N))";
String query = "?applyPolicies=All&%24apply=groupby%28%28Severity%29%2Caggregate%28%24count%20as%20N%29%29";
request_url += query;
Map<String, String> request_headers = m_authProvider.getAuthorizationHeader(true);
request_headers.put("Content-Type", "application/json; charset=UTF-8");
request_headers.put("Accept", "application/json");
Expand Down

0 comments on commit 5a3c49f

Please sign in to comment.