http://localhost:8087/api/tenantcalls/f32b29a3-90ab-46be-a9c2-ea9e184cc243/recordings?%22%22
这个地址后面的?%22%22
是怎么加上去的? 怎么去掉?
我写的源代码如下
App.addMethod('_sendRequest',function(method,path,payload){
var dfd = $.Deferred();
$.ajax({
url:path,
type:method || "get",
headers:{
sessionId:session.id || ''
},
data:JSON.stringify(payload || ""),
dataType:"json",
contentType : 'application/json; charset=UTF-8',
success:function(data){
dfd.resolve(data);
},
error:function(data){
dfd.reject(data);
}
});
return dfd.promise();
});
//根据callId查询录音文件
App.addMethod('_getRecordingsByCallId',function(callId){
var dfd = $.Deferred(),
method = 'get',
path = '/api/tenantcalls/'+callId+'/recordings',
payload = '';
App._sendRequest(method,path,payload)
.done(function(res){dfd.resolve(res);})
.fail(function(res){dfd.reject(res);});
return dfd.promise();
});
慕婉清6462132
相关分类