fix comment

This commit is contained in:
Looly
2021-08-11 11:41:06 +08:00
parent b048cc7fd7
commit 6dc8524e69
3 changed files with 43 additions and 20 deletions

View File

@@ -5,7 +5,6 @@ import cn.hutool.core.date.TimeInterval;
import cn.hutool.core.lang.Console;
import cn.hutool.core.util.CharsetUtil;
import cn.hutool.http.ssl.SSLSocketFactoryBuilder;
import cn.hutool.json.JSONUtil;
import org.junit.Ignore;
import org.junit.Test;
@@ -29,6 +28,14 @@ public class HttpRequestTest {
Console.log(body);
}
@Test
@Ignore
public void getHttpsThenTest() {
HttpRequest
.get("https://hutool.cn")
.then(response -> Console.log(response.body()));
}
@Test
@Ignore
public void getCookiesTest() {
@@ -126,14 +133,15 @@ public class HttpRequestTest {
map.put("size", "2");
map.put("sizes", list);
String s = JSONUtil.toJsonStr(map);
HttpRequest request = HttpUtil.createGet("http://localhost:8888/get");
Console.log(request.execute().body());
HttpRequest
.get("http://localhost:8888/get")
.form(map)
.then(resp -> Console.log(resp.body()));
}
@Test
@Ignore
public void getWithoutEncodeTest(){
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());