mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
Merge branch 'v5-dev' of https://github.com/totalo/hutool into v5-dev
This commit is contained in:
@@ -133,4 +133,14 @@ public class HttpRequestTest {
|
||||
HttpRequest request = HttpUtil.createGet("http://localhost:8888/get");
|
||||
Console.log(request.execute().body());
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void getWithoutEncodeTest(){
|
||||
String url = "https://img-cloud.voc.com.cn/140/2020/09/03/c3d41b93e0d32138574af8e8b50928b376ca5ba61599127028157.png?imageMogr2/auto-orient/thumbnail/500&pid=259848";
|
||||
HttpRequest get = HttpUtil.createGet(url);
|
||||
Console.log(get.getUrl());
|
||||
HttpResponse execute = get.execute();
|
||||
Console.log(execute.body());
|
||||
}
|
||||
}
|
||||
|
@@ -236,7 +236,8 @@ public class HttpUtilTest {
|
||||
map = HttpUtil.decodeParams(a, CharsetUtil.UTF_8);
|
||||
Assert.assertEquals("b", map.get("a").get(0));
|
||||
Assert.assertEquals("d", map.get("c").get(0));
|
||||
Assert.assertEquals("", map.get("e").get(0));
|
||||
Assert.assertNull(map.get("e").get(0));
|
||||
Assert.assertNull(map.get("").get(0));
|
||||
|
||||
// 被编码的键和值被还原
|
||||
a = "a=bbb&c=%E4%BD%A0%E5%A5%BD&%E5%93%88%E5%96%BD=";
|
||||
|
Reference in New Issue
Block a user