我正在尝试从标头中提取代码,这是对ajax查询的响应。在使用xhr.getAllResponseHeaders的javascript no output中使用调试器时,我无法在dom文档中找到响应。该值不会在url本身中返回,仅在Query String Parameters中返回,因此我试图从那里获取它。这可能吗?
这是我的Google检查图片(我已经强调了我想要抓住的代码。)
Google Inspect Header / Query String Parameters
这是我的代码:
$(function() {
$(".btn.getauthzcode").click(function() {
var frapptokenid = readCookie('iPlanetDirectoryPro');
$.ajax({
url: "http://[myurl]:8181/openam/oauth2/authorize?realm=/&client_id=OpenIG&response_type=code&redirect_uri=http://[myurl]:8181/openam&scope=uma_protection&save_consent=0&decision=Allow",
type: "GET",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "POST, GET, PUT, DELETE, OPTIONS",
"Access-Control-Allow-Headers": "X-Requested-With, content-type, X-Token, x-token",
headers: {
"accept": "application/json",
"dataType": "jsonp",
"content-type": "application/json;odata=verbose",
"iPlanetDirectoryPro": frapptokenid,
},
success: function(data, status, xhr, url) {
debugger
console.log(url);
console.log(xhr.getAllResponseHeaders());
)},
failure: function(data) {
console.log(data);
}
});
});
});
答案 0 :(得分:-1)
docker service ps --no-trunc mqtt
嗯,如果库不提供一些变量,我们需要创建一个闭包,将它们保存在变量中