我没有从响应头获取Set-Cookie值。值throw null
reflexive, antisymmetric and transitive
我的代码
$.ajax({
url: ip_add + '/' + reqUrl,
crossDomain: true,
type: "POST",
dataType: "json",
data: req_data,
xhrFields: {
withCredentials: true
},
beforeSend: function(xhr) {
xhr.setRequestHeader("X-CSRFToken", csrftoken);
},
success: function (res, textStatus, XMLHttpRequest) {
var cookietoSet = XMLHttpRequest.getResponseHeader('Set-Cookie');
alert(cookietoSet);
},
cache: false,
});