File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/java/com/berry/storage Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -35,10 +35,12 @@ public final class BucketManage {
3535
3636 private final Auth auth ;
3737 private final Config config ;
38+ private final HttpClient client ;
3839
3940 public BucketManage (Auth auth , Config config ) {
4041 this .auth = auth ;
4142 this .config = config ;
43+ this .client = new HttpClient (config .getUploadTimeout ());
4244 }
4345
4446 /**
@@ -155,13 +157,13 @@ private Boolean getResult(String url, StringMap params) {
155157
156158 private Response get (String url , StringMap params ) {
157159 StringMap header = auth .authorization (url );
158- return HttpClient .get (url , params , header );
160+ return client .get (url , params , header );
159161 }
160162
161163 private Response post (String url , StringMap params ) {
162164 System .out .println ("request url:" + url );
163165 StringMap header = auth .authorization (url );
164166 System .out .println (header .jsonString ());
165- return HttpClient .post (url , params .jsonString (), header );
167+ return client .post (url , params .jsonString (), header );
166168 }
167169}
You can’t perform that action at this time.
0 commit comments