diff --git a/app/src/main/java/com/example/notifyservice/GetRequest.java b/app/src/main/java/com/example/notifyservice/GetRequest.java index 5f8edfe..e3b5304 100644 --- a/app/src/main/java/com/example/notifyservice/GetRequest.java +++ b/app/src/main/java/com/example/notifyservice/GetRequest.java @@ -35,7 +35,7 @@ public class GetRequest { Call call = client.newCall(request); call.enqueue(new Callback() { public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException { - onGetExecute(response.body() != null ? response.body().string() : ""); + onGetExecute(response.peekBody(Long.MAX_VALUE).string()); } public void onFailure(@NonNull Call call, @NonNull IOException e) {