Skip to content

Commit a24c73a

Browse files
committed
📝 更新 README
1 parent 0ef331c commit a24c73a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ HttpUtil.setConfig(HttpConfig.builder()
2929
.timeout(Constants.DEFAULT_TIMEOUT)
3030
.proxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 10080)))
3131
.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());
3435
```
3536

3637
## TODO
3738

3839
- [x] ~~集成 JDK11 的 HTTPClient~~(感谢[@春哥](https://github.com/ChunMengLu)[PR#1](https://github.com/xkcoding/simple-http/pull/1))
3940
- [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))

0 commit comments

Comments
 (0)