@@ -16,10 +16,7 @@ import ru.soune.nocopy.exception.NotValidFieldException;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
|
||||
@Slf4j
|
||||
@@ -56,6 +53,7 @@ public class SearchImageService {
|
||||
.followRedirects(true)
|
||||
.followSslRedirects(true)
|
||||
.retryOnConnectionFailure(true)
|
||||
.protocols(Arrays.asList(Protocol.HTTP_1_1))
|
||||
// .connectionPool(new ConnectionPool(0, 1, TimeUnit.NANOSECONDS))
|
||||
.build();
|
||||
|
||||
@@ -67,6 +65,7 @@ public class SearchImageService {
|
||||
.followRedirects(true)
|
||||
.followSslRedirects(true)
|
||||
.retryOnConnectionFailure(true)
|
||||
.protocols(Arrays.asList(Protocol.HTTP_1_1))
|
||||
// .connectionPool(new ConnectionPool(0, 1, TimeUnit.NANOSECONDS))
|
||||
.build();
|
||||
|
||||
@@ -151,8 +150,8 @@ public class SearchImageService {
|
||||
Request request = new Request.Builder()
|
||||
.url(url)
|
||||
.header("Accept", "*/*")
|
||||
.header("User-Agent", "curl/8.5.0")
|
||||
.header("Host", "www.searchapi.io")
|
||||
// .header("User-Agent", "curl/8.5.0")
|
||||
// .header("Host", "www.searchapi.io")
|
||||
.build();
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
Reference in New Issue
Block a user