Skip to content

Commit 57e3149

Browse files
committed
Changed name and return String
Changed name from callApiJSON to callApiJson and return type from byte[] to String. Signed-off-by: daivdwe <[email protected]>
1 parent 787ed75 commit 57e3149

File tree

1 file changed

+4
-6
lines changed
  • subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/core

1 file changed

+4
-6
lines changed

subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/core/ClientApi.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -475,13 +475,11 @@ public byte[] callApiOther(
475475
return getBytes(requestMethod, "other", component, type, method, params);
476476
}
477477

478-
public byte[] callApiJSON(
479-
String component,
480-
String type,
481-
String method,
482-
Map<String, String> params)
478+
public String callApiJson(
479+
String component, String type, String method, Map<String, String> params)
483480
throws ClientApiException {
484-
return getBytes(HttpRequest.GET_METHOD, "JSON", component, type, method, params);
481+
byte[] json = getBytes(HttpRequest.GET_METHOD, "JSON", component, type, method, params);
482+
return new String(json, StandardCharsets.UTF_8);
485483
}
486484

487485
private byte[] getBytes(

0 commit comments

Comments
 (0)