mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-03 04:13:49 +08:00
add test
This commit is contained in:
parent
506a8c2d3c
commit
fd8cbfa1c9
@ -167,7 +167,7 @@
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>2.0.204</version>
|
||||
<version>2.0.206</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -68,4 +68,20 @@ public class UploadTest {
|
||||
HttpResponse httpResponse = httpRequest.execute();
|
||||
Console.log(httpResponse);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void smmsTest(){
|
||||
// https://github.com/dromara/hutool/issues/2079
|
||||
// hutool的user agent 被封了
|
||||
String token = "test";
|
||||
String url = "https://sm.ms/api/v2/upload";
|
||||
String result = HttpUtil.createPost(url)
|
||||
.header(Header.USER_AGENT, "PostmanRuntime/7.28.4")
|
||||
.auth(token)
|
||||
.form("smfile", FileUtil.file("d:/test/qrcodeCustom.png"))
|
||||
.execute().body();
|
||||
|
||||
Console.log(result);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user