|
13 | 13 | import java.io.IOException; |
14 | 14 | import java.nio.charset.StandardCharsets; |
15 | 15 | import java.util.Objects; |
| 16 | + |
| 17 | +import static utils.FileUtilities.Json.*; |
16 | 18 | import static utils.reflection.ReflectionUtilities.getPreviousMethodName; |
17 | 19 | import static utils.StringUtilities.Color.*; |
18 | 20 | import static utils.reflection.ReflectionUtilities.isOfType; |
@@ -142,15 +144,15 @@ private static <T> Response<T> getResponse(Call<T> call, boolean printBody) thro |
142 | 144 | T body = response.body(); |
143 | 145 | if (keepLogs) log.success("The response code is: " + response.code()); |
144 | 146 | if (keepLogs && !response.message().isEmpty()) log.info(response.message()); |
145 | | - if (printBody && printableResponse) log.info("The response body is: \n" + MappingUtilities.Json.getJsonString(body)); |
| 147 | + if (printBody && printableResponse) log.info("The response body is: \n" + getJsonString(body)); |
146 | 148 | return Response.success(body, response.raw()); |
147 | 149 | } |
148 | 150 | else { |
149 | 151 | log.warning("The response code is: " + response.code()); |
150 | 152 | if (response.message().length()>0) log.warning(response.message()); |
151 | 153 | if (response.errorBody() != null && printBody) { |
152 | 154 | Object errorBody = isOfType(response, Object.class) ? |
153 | | - MappingUtilities.Json.getJsonString(getErrorObject(response, Object.class)) : |
| 155 | + getJsonString(getErrorObject(response, Object.class)) : |
154 | 156 | response.raw(); |
155 | 157 | String errorLog = errorBody.equals("null") ? |
156 | 158 | "The error body is empty." : |
|
0 commit comments