我将 OData 与 JQuery 一起使用。我的问题是我需要检索 Header 因为我需要 Header 值。你们知道语法吗?
我的代码如下:
OData.request( {headers: { "X-CSRF-Token" :"Fetch" }, requestUri:queryserviceUriNew, user: uname, password: pword },
function (data, response)
{
//Success Callback (received data is a Feed):
alert("Retrieved.");
alert(response);
// This is the object that hold the response, I need to capture the header value for "x-csrf-token"
}
谢谢各位专家!