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