File tree 2 files changed +17
-1
lines changed
hutool-http/src/test/java/cn/hutool/http
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 167
167
<dependency >
168
168
<groupId >com.h2database</groupId >
169
169
<artifactId >h2</artifactId >
170
- <version >2.0.204 </version >
170
+ <version >2.0.206 </version >
171
171
<scope >test</scope >
172
172
</dependency >
173
173
<dependency >
Original file line number Diff line number Diff line change @@ -68,4 +68,20 @@ public void uploadTest2() {
68
68
HttpResponse httpResponse = httpRequest .execute ();
69
69
Console .log (httpResponse );
70
70
}
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
+ }
71
87
}
You can’t perform that action at this time.
0 commit comments