File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,13 @@ HttpUtil.setConfig(HttpConfig.builder()
29
29
.timeout(Constants . DEFAULT_TIMEOUT )
30
30
.proxy(new Proxy (Proxy . Type . HTTP , new InetSocketAddress (" 127.0.0.1" , 10080 )))
31
31
.build());
32
- String s = HttpUtil . get(" https://www.google.com" );
33
- System . out. println(" s = " + s);
32
+ SimpleHttpResponse response = HttpUtil . get(" https://www.google.com" );
33
+ System . out. println(" code = " + response. getCode());
34
+ System . out. println(" body = " + response. getBody());
34
35
```
35
36
36
37
## TODO
37
38
38
39
- [x] ~~ 集成 JDK11 的 HTTPClient~~ (感谢[ @春哥] ( https://github.com/ChunMengLu ) 的 [ PR #1 ] ( https://github.com/xkcoding/simple-http/pull/1 ) )
39
40
- [x] ~~ 支持代理~~ (感谢[ @亚东] ( https://github.com/zhangyd-c ) 的 [ PR #7 ] ( https://github.com/xkcoding/simple-http/pull/7 ) )
41
+ - [x] ~~ Response 封装~~ (感谢[ @小海] ( https://github.com/Mvbbb ) 的 [ PR #11 ] ( https://github.com/xkcoding/simple-http/pull/11 ) )
You can’t perform that action at this time.
0 commit comments