@@ -145,7 +145,7 @@ public String[] domainList(String bucket) throws QiniuException {
145
145
}
146
146
147
147
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 );
149
149
Response res = get (url );
150
150
if (!res .isOK ()) {
151
151
throw new QiniuException (res );
@@ -690,7 +690,8 @@ public Response setImage(String bucket, String srcSiteUrl, String host) throws Q
690
690
if (encodedHost != null ) {
691
691
path += String .format ("/host/%s" , encodedHost );
692
692
}
693
- return pubPost (path );
693
+ path = String .format ("%s%s" , configHelper .ucHost (), path );
694
+ return post (path , null );
694
695
}
695
696
696
697
/**
@@ -702,8 +703,8 @@ public Response setImage(String bucket, String srcSiteUrl, String host) throws Q
702
703
*/
703
704
@ Deprecated
704
705
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 );
707
708
}
708
709
709
710
/**
@@ -1074,7 +1075,7 @@ public Response setBucketAcl(String bucket, AclType acl) throws QiniuException {
1074
1075
*/
1075
1076
public Response putBucketQuota (String bucket , BucketQuota bucketQuota ) throws QiniuException {
1076
1077
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 ());
1078
1079
Response res = post (url , null );
1079
1080
if (!res .isOK ()) {
1080
1081
throw new QiniuException (res );
@@ -1097,7 +1098,7 @@ public BucketQuota getBucketQuota(String bucket) throws QiniuException {
1097
1098
}
1098
1099
1099
1100
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 );
1101
1102
Response res = post (url , null );
1102
1103
if (!res .isOK ()) {
1103
1104
throw new QiniuException (res );
@@ -1137,11 +1138,6 @@ private Response ioPost(String bucket, String path) throws QiniuException {
1137
1138
return post (url , null );
1138
1139
}
1139
1140
1140
- private Response pubPost (String path ) throws QiniuException {
1141
- String url = "http://pu.qbox.me:10200" + path ;
1142
- return post (url , null );
1143
- }
1144
-
1145
1141
private Response get (String url ) throws QiniuException {
1146
1142
StringMap headers = auth .authorizationV2 (url , "GET" , null , null );
1147
1143
return client .get (url , headers );
0 commit comments