您应该能够像这样在 SDK 1.x 中删除:
function delete(ref, callback, errorCallback) {
var config = {
url: ref,
content: {},
headers: { "Content-Type": "application/json" },
handleAs:"json",
preventCache: true,
load: callback,
error: errorCallback
};
if (rally.sdk.util.Context.isInsideRally()) {
dojo.xhrDelete(config);
} else {
config.callbackParamName = "jsonp";
config.content._method = "DELETE";
dojo.io.script.get(config);
}
}
//delete an item
delete('https://rally1.rallydev.com/slm/webservice/1.32/defect/12345.js',
function(results) {
//success
},
function(results) {
//error
}
);
我们打算通过 rally.sdk.data.io.httpDelete 和 rally.sdk.data.RallyDataSource.delete 公开这个功能,但从未完全测试并发布它。