@@ -1039,14 +1039,15 @@ BucketManager.prototype.putBucketLifecycleRule = function (
1039
1039
options
1040
1040
) ;
1041
1041
const reqSpec = querystring . stringify ( reqParams ) ;
1042
- const reqOp = ` /rules/add? ${ reqSpec } ` ;
1042
+ const reqOp = ' /rules/add' ;
1043
1043
1044
1044
return this . _tryReq ( {
1045
1045
serviceName : SERVICE_NAME . UC ,
1046
1046
func : context => {
1047
1047
const requestURL = this . _getEndpointVal ( context . endpoint ) + reqOp ;
1048
1048
return this . _httpClient . post ( {
1049
1049
url : requestURL ,
1050
+ data : reqSpec ,
1050
1051
callback : wrapTryCallback ( callbackFunc )
1051
1052
} ) ;
1052
1053
}
@@ -1067,13 +1068,14 @@ BucketManager.prototype.deleteBucketLifecycleRule = function (bucket, name, call
1067
1068
name : name
1068
1069
} ;
1069
1070
const reqSpec = querystring . stringify ( reqParams ) ;
1070
- const reqOp = ` /rules/delete? ${ reqSpec } ` ;
1071
+ const reqOp = ' /rules/delete' ;
1071
1072
return this . _tryReq ( {
1072
1073
serviceName : SERVICE_NAME . UC ,
1073
1074
func : context => {
1074
1075
const requestURL = this . _getEndpointVal ( context . endpoint ) + reqOp ;
1075
1076
return this . _httpClient . post ( {
1076
1077
url : requestURL ,
1078
+ data : reqSpec ,
1077
1079
callback : wrapTryCallback ( callbackFunc )
1078
1080
} ) ;
1079
1081
}
@@ -1107,14 +1109,15 @@ BucketManager.prototype.updateBucketLifecycleRule = function (bucket, options, c
1107
1109
options
1108
1110
) ;
1109
1111
const reqSpec = querystring . stringify ( reqParams ) ;
1110
- const reqOp = ` /rules/update? ${ reqSpec } ` ;
1112
+ const reqOp = ' /rules/update' ;
1111
1113
1112
1114
return this . _tryReq ( {
1113
1115
serviceName : SERVICE_NAME . UC ,
1114
1116
func : context => {
1115
1117
const requestURL = this . _getEndpointVal ( context . endpoint ) + reqOp ;
1116
1118
return this . _httpClient . post ( {
1117
1119
url : requestURL ,
1120
+ data : reqSpec ,
1118
1121
callback : wrapTryCallback ( callbackFunc )
1119
1122
} ) ;
1120
1123
}
@@ -1134,7 +1137,7 @@ BucketManager.prototype.getBucketLifecycleRule = function (bucket, callbackFunc)
1134
1137
serviceName : SERVICE_NAME . UC ,
1135
1138
func : context => {
1136
1139
const requestURL = this . _getEndpointVal ( context . endpoint ) + reqOp ;
1137
- return this . _httpClient . post ( {
1140
+ return this . _httpClient . get ( {
1138
1141
url : requestURL ,
1139
1142
callback : wrapTryCallback ( callbackFunc )
1140
1143
} ) ;
@@ -1177,14 +1180,15 @@ BucketManager.prototype.putBucketEvent = function (bucket, options, callbackFunc
1177
1180
1178
1181
// in docs the params should be putted into body
1179
1182
// keep compatibility with old sdk versions
1180
- const reqOp = ` /events/add? ${ reqSpec } ` ;
1183
+ const reqOp = ' /events/add' ;
1181
1184
1182
1185
return this . _tryReq ( {
1183
1186
serviceName : SERVICE_NAME . UC ,
1184
1187
func : context => {
1185
1188
const requestURL = this . _getEndpointVal ( context . endpoint ) + reqOp ;
1186
1189
return this . _httpClient . post ( {
1187
1190
url : requestURL ,
1191
+ data : reqSpec ,
1188
1192
callback : wrapTryCallback ( callbackFunc )
1189
1193
} ) ;
1190
1194
}
@@ -1213,14 +1217,15 @@ BucketManager.prototype.updateBucketEvent = function (bucket, options, callbackF
1213
1217
) ;
1214
1218
1215
1219
const reqSpec = querystring . stringify ( reqParams ) ;
1216
- const reqOp = ` /events/update? ${ reqSpec } ` ;
1220
+ const reqOp = ' /events/update' ;
1217
1221
1218
1222
return this . _tryReq ( {
1219
1223
serviceName : SERVICE_NAME . UC ,
1220
1224
func : context => {
1221
1225
const requestURL = this . _getEndpointVal ( context . endpoint ) + reqOp ;
1222
1226
return this . _httpClient . post ( {
1223
1227
url : requestURL ,
1228
+ data : reqSpec ,
1224
1229
callback : wrapTryCallback ( callbackFunc )
1225
1230
} ) ;
1226
1231
}
@@ -1239,7 +1244,7 @@ BucketManager.prototype.getBucketEvent = function (bucket, callbackFunc) {
1239
1244
serviceName : SERVICE_NAME . UC ,
1240
1245
func : context => {
1241
1246
const requestURL = this . _getEndpointVal ( context . endpoint ) + reqOp ;
1242
- return this . _httpClient . post ( {
1247
+ return this . _httpClient . get ( {
1243
1248
url : requestURL ,
1244
1249
callback : wrapTryCallback ( callbackFunc )
1245
1250
} ) ;
@@ -1260,14 +1265,15 @@ BucketManager.prototype.deleteBucketEvent = function (bucket, name, callbackFunc
1260
1265
name : name
1261
1266
} ;
1262
1267
const reqSpec = querystring . stringify ( reqParams ) ;
1263
- const reqOp = ` /events/delete? ${ reqSpec } ` ;
1268
+ const reqOp = ' /events/delete' ;
1264
1269
1265
1270
return this . _tryReq ( {
1266
1271
serviceName : SERVICE_NAME . UC ,
1267
1272
func : context => {
1268
1273
const requestURL = this . _getEndpointVal ( context . endpoint ) + reqOp ;
1269
1274
return this . _httpClient . post ( {
1270
1275
url : requestURL ,
1276
+ data : reqSpec ,
1271
1277
callback : wrapTryCallback ( callbackFunc )
1272
1278
} ) ;
1273
1279
}
0 commit comments