File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/main/java/com/xkcoding/http Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 17
17
package com .xkcoding .http ;
18
18
19
19
import com .xkcoding .http .config .HttpConfig ;
20
+ import com .xkcoding .http .constants .Constants ;
20
21
import com .xkcoding .http .exception .SimpleHttpException ;
21
22
import com .xkcoding .http .support .AbstractHttp ;
22
23
import com .xkcoding .http .support .Http ;
@@ -86,7 +87,7 @@ private void checkHttpNotNull(Http proxy) {
86
87
public void setConfig (HttpConfig httpConfig ) {
87
88
checkHttpNotNull (proxy );
88
89
if (null == httpConfig ) {
89
- httpConfig = new HttpConfig ();
90
+ httpConfig = HttpConfig . builder (). timeout ( Constants . DEFAULT_TIMEOUT ). build ();
90
91
}
91
92
proxy .setHttpConfig (httpConfig );
92
93
}
Original file line number Diff line number Diff line change 1
1
package com .xkcoding .http .config ;
2
2
3
3
import com .xkcoding .http .constants .Constants ;
4
+ import lombok .AllArgsConstructor ;
5
+ import lombok .Builder ;
4
6
import lombok .Data ;
7
+ import lombok .NoArgsConstructor ;
5
8
6
9
import java .net .Proxy ;
7
10
14
17
* @date Created in 2020-04-29 14:41
15
18
*/
16
19
@ Data
20
+ @ Builder
21
+ @ NoArgsConstructor
22
+ @ AllArgsConstructor
17
23
public class HttpConfig {
18
24
/**
19
25
* 超时时长,单位毫秒
You can’t perform that action at this time.
0 commit comments