@@ -145,7 +145,7 @@ public String[] domainList(String bucket) throws QiniuException {
145145 }
146146
147147 public Response domainListResponse (String bucket ) throws QiniuException {
148- String url = String .format ("%s/v6/domain/list ?tbl=%s" , configHelper .apiHost ( auth . accessKey , bucket ), bucket );
148+ String url = String .format ("%s/v2/domains ?tbl=%s" , configHelper .ucHost ( ), bucket );
149149 Response res = get (url );
150150 if (!res .isOK ()) {
151151 throw new QiniuException (res );
@@ -690,7 +690,8 @@ public Response setImage(String bucket, String srcSiteUrl, String host) throws Q
690690 if (encodedHost != null ) {
691691 path += String .format ("/host/%s" , encodedHost );
692692 }
693- return pubPost (path );
693+ path = String .format ("%s%s" , configHelper .ucHost (), path );
694+ return post (path , null );
694695 }
695696
696697 /**
@@ -702,8 +703,8 @@ public Response setImage(String bucket, String srcSiteUrl, String host) throws Q
702703 */
703704 @ Deprecated
704705 public Response unsetImage (String bucket ) throws QiniuException {
705- String path = String .format ("/unimage/%s" , bucket );
706- return pubPost (path );
706+ String path = String .format ("%s /unimage/%s" , configHelper . ucHost () , bucket );
707+ return post (path , null );
707708 }
708709
709710 /**
@@ -1074,7 +1075,7 @@ public Response setBucketAcl(String bucket, AclType acl) throws QiniuException {
10741075 */
10751076 public Response putBucketQuota (String bucket , BucketQuota bucketQuota ) throws QiniuException {
10761077 String url = String .format ("%s/setbucketquota/%s/size/%d/count/%d" ,
1077- configHelper .apiHost ( auth . accessKey , bucket ), bucket , bucketQuota .getSize (), bucketQuota .getCount ());
1078+ configHelper .ucHost ( ), bucket , bucketQuota .getSize (), bucketQuota .getCount ());
10781079 Response res = post (url , null );
10791080 if (!res .isOK ()) {
10801081 throw new QiniuException (res );
@@ -1097,7 +1098,7 @@ public BucketQuota getBucketQuota(String bucket) throws QiniuException {
10971098 }
10981099
10991100 public Response getBucketQuotaResponse (String bucket ) throws QiniuException {
1100- String url = String .format ("%s/getbucketquota/%s" , configHelper .apiHost ( auth . accessKey , bucket ), bucket );
1101+ String url = String .format ("%s/getbucketquota/%s" , configHelper .ucHost ( ), bucket );
11011102 Response res = post (url , null );
11021103 if (!res .isOK ()) {
11031104 throw new QiniuException (res );
@@ -1137,11 +1138,6 @@ private Response ioPost(String bucket, String path) throws QiniuException {
11371138 return post (url , null );
11381139 }
11391140
1140- private Response pubPost (String path ) throws QiniuException {
1141- String url = "http://pu.qbox.me:10200" + path ;
1142- return post (url , null );
1143- }
1144-
11451141 private Response get (String url ) throws QiniuException {
11461142 StringMap headers = auth .authorizationV2 (url , "GET" , null , null );
11471143 return client .get (url , headers );
0 commit comments