mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -2,6 +2,7 @@ package cn.hutool.http;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.StopWatch;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.lang.Console;
|
||||
import cn.hutool.core.net.ssl.SSLProtocols;
|
||||
import cn.hutool.core.net.url.UrlBuilder;
|
||||
@@ -19,6 +20,7 @@ import java.util.Map;
|
||||
*
|
||||
* @author Looly
|
||||
*/
|
||||
@SuppressWarnings("resource")
|
||||
public class HttpRequestTest {
|
||||
final String url = "http://photo.qzone.qq.com/fcgi-bin/fcg_list_album?uin=88888&outstyle=2";
|
||||
|
||||
@@ -218,4 +220,34 @@ public class HttpRequestTest {
|
||||
final HttpResponse execute = HttpRequest.get("http://localhost:8888/getCookier").execute();
|
||||
Console.log(execute.getCookies());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void optionsTest() {
|
||||
final HttpRequest options = HttpRequest.options("https://hutool.cn");
|
||||
Assert.notNull(options.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void deleteTest() {
|
||||
final HttpRequest options = HttpRequest.delete("https://hutool.cn");
|
||||
Assert.notNull(options.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void traceTest() {
|
||||
final HttpRequest options = HttpRequest.trace("https://hutool.cn");
|
||||
Assert.notNull(options.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getToStringTest() {
|
||||
final HttpRequest a = HttpRequest.get("https://hutool.cn/").form("a", 1);
|
||||
Assert.notNull(a.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void postToStringTest() {
|
||||
final HttpRequest a = HttpRequest.post("https://hutool.cn/").form("a", 1);
|
||||
Console.log(a.toString());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user