我正在向这样的 API 发布有角度的 http 帖子
$http({
method: 'POST',
url: 'http://api/ClientEndpoint',
data: register,
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
transformRequest: function (obj) {
var str = [];
for (var p in obj)
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
return str.join("&");
}
}).error(function (data, status, headers, config) {
alert(data);
});
返回以下响应
但我无法将响应路径存储在变量中。我怎样才能做到这一点?
我想访问存储 ClientEndpoint 值