mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add tes
This commit is contained in:
parent
4fa9fb8606
commit
d307a95f37
28
hutool-http/src/test/java/cn/hutool/http/Issue3074Test.java
Normal file
28
hutool-http/src/test/java/cn/hutool/http/Issue3074Test.java
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023 looly(loolly@aliyun.com)
|
||||||
|
* Hutool is licensed under Mulan PSL v2.
|
||||||
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the Mulan PSL v2 for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cn.hutool.http;
|
||||||
|
|
||||||
|
import org.junit.Ignore;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class Issue3074Test {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Ignore
|
||||||
|
public void bodyTest() {
|
||||||
|
HttpUtil.createPost("http://localhost:8888/body")
|
||||||
|
.contentType(ContentType.JSON.getValue())
|
||||||
|
.body("aaa")
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
|
}
|
@ -10,8 +10,8 @@
|
|||||||
* See the Mulan PSL v2 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import cn.hutool.http.HttpGlobalConfig;
|
package cn.hutool.http;
|
||||||
import cn.hutool.http.HttpUtil;
|
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
@ -55,6 +55,10 @@ public class SimpleServerTest {
|
|||||||
res.write("0");
|
res.write("0");
|
||||||
Console.log("Write 0 OK");
|
Console.log("Write 0 OK");
|
||||||
})
|
})
|
||||||
|
.addAction("/body", (req, resp) -> {
|
||||||
|
Console.log(req.getBody());
|
||||||
|
resp.write(req.getBody());
|
||||||
|
})
|
||||||
.start();
|
.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user