@@ -135,38 +135,13 @@ public class SearchImageService {
|
|||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
|
|
||||||
try (Response response = client.newCall(request).execute()) {
|
try (Response response = client.newCall(request).execute()) {
|
||||||
ResponseBody body = response.body();
|
ResponseBody body = response.body();
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
log.info("START READ BODY: ");
|
||||||
log.info("Search reverse response body: {}", body);
|
String responseBody = readWithTimeout(body, 30000);
|
||||||
log.info("Search reverse response body: {}", body);
|
log.info("Search reverse response body length: {} bytes", responseBody.length());
|
||||||
log.info("Search reverse response body: {}", body);
|
log.info("Response preview: {}", responseBody.substring(0, Math.min(500, responseBody.length())));
|
||||||
log.info("Search reverse response body: {}", body);
|
log.info("END READ BODY: ");
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
log.info("Search reverse response body: {}", body);
|
|
||||||
// long duration = System.currentTimeMillis() - start;
|
// long duration = System.currentTimeMillis() - start;
|
||||||
// log.info("SearchAPI response code={}, duration={}ms, engine={}",
|
// log.info("SearchAPI response code={}, duration={}ms, engine={}",
|
||||||
// response.code(), duration, engine);
|
// response.code(), duration, engine);
|
||||||
@@ -176,10 +151,9 @@ public class SearchImageService {
|
|||||||
// throw new IOException("API error " + response.code() + ": " + errorBody);
|
// throw new IOException("API error " + response.code() + ": " + errorBody);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// ResponseBody body = response.body();
|
// if (body == null) {
|
||||||
if (body == null) {
|
// throw new IOException("Empty response body");
|
||||||
throw new IOException("Empty response body");
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
return body.string();
|
return body.string();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user