这项工作在邮递员
我的电话是
$http({
method: 'POST',
url: CONFIG.APIURL+"api/XXXX/XXX/XXXX",
headers: {
'Content-Type': 'application/json; charset=utf-8',
'CREDENTIALS': 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX'
},
data:params2
}).then(function(response) {
sucursales=response.XXX.XXX.XXX;
deferred.resolve(response);
},function( msg , code ) {
alert('fracasoo');
deferred.reject(msg);
$log.error(msg, code);
});
我如何调用并传递数据un body>生?
解决方案:
$http({
method: 'POST',
url: CONFIG.APIURL+"api/Comentarios",
'processData': false,
'crossDomain': true ,
headers: {
'Content-Type': 'application/json',
'CREDENTIALS': 'XXXXXXXX',
'Cache-Control': 'no-cache'
},
data: "\"{XX:0,XX:10,XX:20170220,XX:20170420,XX:"+XX+"}\"\n"
}).then(function(response) {
alert("exito comentarios from server");
comentarios=response.XX.XX.XX;
deferred.resolve(response);
},function(msg, code) {
alert("fracaso comentarios from server");
deferred.reject(msg);
$log.error(msg, code);
});
此处数据在体内传播>原始并在服务网络中捕获