Commit 4b57a3fd by 宋毅

tj

parent 4ba20d41
......@@ -207,25 +207,25 @@ class ExecClientNew {
if (!ContentType) {
ContentType = "application/json";
}
var data = null;
if (typeof params === 'object') {
// 声明cache变量,便于匹配是否有循环引用的情况
var cache = [];
data = JSON.stringify(params, function (key, value) {
if (typeof value === 'object' && value !== null) {
if (cache.indexOf(value) !== -1) {
// 移除
return;
}
// 收集所有的值
cache.push(value);
}
return value;
});
cache = null; // 清空变量,便于垃圾回收机制回收
} else {
data = params;
}
var data = JSON.stringify(params);
// if (typeof params === 'object') {
// // 声明cache变量,便于匹配是否有循环引用的情况
// var cache = [];
// data = JSON.stringify(params, function (key, value) {
// if (typeof value === 'object' && value !== null) {
// if (cache.indexOf(value) !== -1) {
// // 移除
// return;
// }
// // 收集所有的值
// cache.push(value);
// }
// return value;
// });
// cache = null; // 清空变量,便于垃圾回收机制回收
// } else {
// data = params;
// }
var cmdStr = "curl --user admines:adminGSBes. -k -H 'Content-type:" + ContentType + "'";
if (headData) {
var headDataKeys = Object.keys(headData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment