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 1717package com .xkcoding .http ;
1818
1919import com .xkcoding .http .config .HttpConfig ;
20+ import com .xkcoding .http .constants .Constants ;
2021import com .xkcoding .http .exception .SimpleHttpException ;
2122import com .xkcoding .http .support .AbstractHttp ;
2223import com .xkcoding .http .support .Http ;
@@ -86,7 +87,7 @@ private void checkHttpNotNull(Http proxy) {
8687 public void setConfig (HttpConfig httpConfig ) {
8788 checkHttpNotNull (proxy );
8889 if (null == httpConfig ) {
89- httpConfig = new HttpConfig ();
90+ httpConfig = HttpConfig . builder (). timeout ( Constants . DEFAULT_TIMEOUT ). build ();
9091 }
9192 proxy .setHttpConfig (httpConfig );
9293 }
Original file line number Diff line number Diff line change 11package com .xkcoding .http .config ;
22
33import com .xkcoding .http .constants .Constants ;
4+ import lombok .AllArgsConstructor ;
5+ import lombok .Builder ;
46import lombok .Data ;
7+ import lombok .NoArgsConstructor ;
58
69import java .net .Proxy ;
710
1417 * @date Created in 2020-04-29 14:41
1518 */
1619@ Data
20+ @ Builder
21+ @ NoArgsConstructor
22+ @ AllArgsConstructor
1723public class HttpConfig {
1824 /**
1925 * 超时时长,单位毫秒
You can’t perform that action at this time.
0 commit comments