Skip to content

Commit 9143c6c

Browse files
committed
Changes return format
1 parent ea8cf78 commit 9143c6c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/io/appsfly/core/AppInstance.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,11 @@ public JSONObject execSync(final String intent, final JSONObject intentData, fin
109109
String responseChecksum = response.headers().get("X-Checksum");
110110
if(responseChecksum!=null){
111111
byte[] bytes = response.body().bytes();
112-
System.out.println(bytes.length);
113-
ResponseBody data = response.body();
114-
System.out.println(data.toString());
112+
String data = response.body().string();
113+
System.out.println(data);
115114
boolean verified = CtyptoUtil.getInstance().verifychecksum(bytes, responseChecksum, config.secretKey);
116115
if (verified){
117-
return new JSONObject(data.string());
116+
return new JSONObject(data);
118117
}
119118
else{
120119
throw new AppsflyException("Checksum Validation Failed");

0 commit comments

Comments
 (0)