var headers = {ajaxRequest:true}; headers['replayId'] = uuid.v4().replace(/\-/g, "").toUpperCase(); headers['Content-Type']="application/json"; $.ajax({ url : "/framework/ws/optionItem/listOptionItem?id="+approvalItemId, type : 'GET', timeout: 120 * 1000, async: true, headers: headers, //必须有 xhrFields: { withCredentials: true }, success : function(data) { //方法 } });
var formData = new FormData(); formData.append("myfile", fileObject); $.ajax({ url : "/framework/ws/annexaa/uploadAnnex?replayId="+replayId+"&fileUpload=true", type : 'POST', data:formData, timeout: 120 * 1000, async: true, processData:false, contentType:false, xhrFields: { withCredentials: true }, success : function(data) { //方法 } });
Powered by codetiler.com