File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
main/src/main/java/com/sedmelluq/discord/lavaplayer/tools/io Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 37
37
public class HttpClientTools {
38
38
private static final Logger log = LoggerFactory .getLogger (HttpClientTools .class );
39
39
40
- public static final RequestConfig DEFAULT_REQUEST_CONFIG = RequestConfig .custom ()
40
+ public static RequestConfig DEFAULT_REQUEST_CONFIG = RequestConfig .custom ()
41
41
.setConnectTimeout (3000 )
42
42
.setConnectionRequestTimeout (3000 )
43
43
.setSocketTimeout (3000 )
44
44
.setCookieSpec (CookieSpecs .STANDARD )
45
45
.build ();
46
46
47
- private static final RequestConfig NO_COOKIES_REQUEST_CONFIG = RequestConfig .custom ()
47
+ private static RequestConfig NO_COOKIES_REQUEST_CONFIG = RequestConfig .custom ()
48
48
.setConnectTimeout (3000 )
49
49
.setConnectionRequestTimeout (3000 )
50
50
.setSocketTimeout (3000 )
51
51
.setCookieSpec (CookieSpecs .IGNORE_COOKIES )
52
52
.build ();
53
53
54
+ public static void setDefaultRequestConfig (RequestConfig requestConfig ) {
55
+ DEFAULT_REQUEST_CONFIG = requestConfig ;
56
+ }
57
+
58
+ public static void setNoCookiesRequestConfig (RequestConfig requestConfig ) {
59
+ NO_COOKIES_REQUEST_CONFIG = requestConfig ;
60
+ }
61
+
54
62
/**
55
63
* @return An HttpClientBuilder which uses the same cookie store for all clients
56
64
*/
You can’t perform that action at this time.
0 commit comments