mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user