This commit is contained in:
Looly
2024-11-04 18:08:00 +08:00
parent a628f6a8eb
commit 96ad2ed57f
3 changed files with 80 additions and 19 deletions

View File

@@ -0,0 +1,21 @@
package org.dromara.hutool.http.client;
import org.dromara.hutool.core.lang.Console;
import org.dromara.hutool.http.client.engine.ClientEngineFactory;
import org.dromara.hutool.http.meta.Method;
import org.junit.jupiter.api.Test;
public class IssueIB1QHQTest {
@Test
void requestByOkHttpTest() {
for (int i = 0; i < 3; i++) {
String response = ClientEngineFactory.createEngine("OkHttp")
.send(Request
.of("https://hutool.cn")
.method(Method.POST)
.body("123")
).bodyStr();
Console.log("response: {}", response);
}
}
}