Skip to content

Commit fd8cbfa

Browse files
committed
add test
1 parent 506a8c2 commit fd8cbfa

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

Diff for: hutool-db/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
<dependency>
168168
<groupId>com.h2database</groupId>
169169
<artifactId>h2</artifactId>
170-
<version>2.0.204</version>
170+
<version>2.0.206</version>
171171
<scope>test</scope>
172172
</dependency>
173173
<dependency>

Diff for: hutool-http/src/test/java/cn/hutool/http/UploadTest.java

+16
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,20 @@ public void uploadTest2() {
6868
HttpResponse httpResponse = httpRequest.execute();
6969
Console.log(httpResponse);
7070
}
71+
72+
@Test
73+
@Ignore
74+
public void smmsTest(){
75+
// https://github.com/dromara/hutool/issues/2079
76+
// hutool的user agent 被封了
77+
String token = "test";
78+
String url = "https://sm.ms/api/v2/upload";
79+
String result = HttpUtil.createPost(url)
80+
.header(Header.USER_AGENT, "PostmanRuntime/7.28.4")
81+
.auth(token)
82+
.form("smfile", FileUtil.file("d:/test/qrcodeCustom.png"))
83+
.execute().body();
84+
85+
Console.log(result);
86+
}
7187
}

0 commit comments

Comments
 (0)