mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add session
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
package org.dromara.hutool.http.client;
|
||||
|
||||
import org.dromara.hutool.core.lang.Console;
|
||||
import org.dromara.hutool.http.HttpUtil;
|
||||
import org.dromara.hutool.http.client.engine.ClientEngine;
|
||||
import org.dromara.hutool.http.client.engine.httpclient4.HttpClient4Engine;
|
||||
import org.dromara.hutool.http.meta.Method;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -25,7 +25,7 @@ public class HttpClient4EngineTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void getTest() {
|
||||
final ClientEngine engine = new HttpClient4Engine();
|
||||
final ClientEngine engine = HttpUtil.createClient("httpclient4");
|
||||
|
||||
final Request req = Request.of("https://www.hutool.cn/").method(Method.GET);
|
||||
final Response res = engine.send(req);
|
||||
|
@@ -13,8 +13,8 @@
|
||||
package org.dromara.hutool.http.client;
|
||||
|
||||
import org.dromara.hutool.core.lang.Console;
|
||||
import org.dromara.hutool.http.HttpUtil;
|
||||
import org.dromara.hutool.http.client.engine.ClientEngine;
|
||||
import org.dromara.hutool.http.client.engine.httpclient5.HttpClient5Engine;
|
||||
import org.dromara.hutool.http.meta.Method;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -25,7 +25,7 @@ public class HttpClient5EngineTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void getTest() {
|
||||
final ClientEngine engine = new HttpClient5Engine();
|
||||
final ClientEngine engine = HttpUtil.createClient("httpclient5");
|
||||
|
||||
final Request req = Request.of("https://www.hutool.cn/").method(Method.GET);
|
||||
final Response res = engine.send(req);
|
||||
|
@@ -13,9 +13,8 @@
|
||||
package org.dromara.hutool.http.client;
|
||||
|
||||
import org.dromara.hutool.core.lang.Console;
|
||||
import org.dromara.hutool.http.HttpUtil;
|
||||
import org.dromara.hutool.http.client.engine.ClientEngine;
|
||||
import org.dromara.hutool.http.client.engine.httpclient4.HttpClient4Engine;
|
||||
import org.dromara.hutool.http.client.engine.okhttp.OkHttpEngine;
|
||||
import org.dromara.hutool.http.meta.Method;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -25,7 +24,7 @@ public class Issue3240Test {
|
||||
@Disabled
|
||||
void okHttpTest() {
|
||||
String url = "https://gh.yubue.cn/https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json";
|
||||
final ClientEngine engine = new OkHttpEngine();
|
||||
final ClientEngine engine = HttpUtil.createClient("okhttp");
|
||||
final Response send = engine.send(Request.of(url).method(Method.GET));
|
||||
Console.log(send.body().getString());
|
||||
}
|
||||
@@ -34,7 +33,7 @@ public class Issue3240Test {
|
||||
@Disabled
|
||||
void httpClient4Test() {
|
||||
String url = "https://gh.yubue.cn/https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json";
|
||||
final ClientEngine engine = new HttpClient4Engine();
|
||||
final ClientEngine engine = HttpUtil.createClient("okhttp");
|
||||
final Response send = engine.send(Request.of(url).method(Method.GET));
|
||||
Console.log(send.body().getString());
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
public class IssueI7ZRJUTest {
|
||||
|
||||
@SuppressWarnings({"resource", "TestFailedLine"})
|
||||
@SuppressWarnings({"resource"})
|
||||
@Test
|
||||
@Disabled
|
||||
void getBadSSlTest() {
|
||||
|
@@ -13,8 +13,8 @@
|
||||
package org.dromara.hutool.http.client;
|
||||
|
||||
import org.dromara.hutool.core.lang.Console;
|
||||
import org.dromara.hutool.http.HttpUtil;
|
||||
import org.dromara.hutool.http.client.engine.ClientEngine;
|
||||
import org.dromara.hutool.http.client.engine.jdk.JdkClientEngine;
|
||||
import org.dromara.hutool.http.meta.Method;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -24,7 +24,7 @@ public class JdkEngineTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void getTest(){
|
||||
final ClientEngine engine = new JdkClientEngine();
|
||||
final ClientEngine engine = HttpUtil.createClient("jdkClient");
|
||||
|
||||
final Request req = Request.of("https://www.hutool.cn/").method(Method.GET);
|
||||
final Response res = engine.send(req);
|
||||
|
Reference in New Issue
Block a user