Here I am unable to fetch token using sapui5 can someone help me out. Thank You
var serviceURI = "proxy/http/server:8000/sap/opu/odata/sap/ZCUST_TESTING_SRV/read_cust/?$filter=IKunnr eq '800COL101'";
var request =
{ headers: {"X-Requested-With": "XMLHttpRequest",
"Accept": "application/atom+xml,application/atomsvc+xml,application/xml",
"DataServiceVersion": "2.0",
"x-csrf-token" : "fetch",
"Content-type" : "application/xml",
},
requestUri: serviceURI,
method: "GET",
user: "mobtest",
password: "welcome1",
data: "" };
OData.request( request,
function (data, response) {
var header_xcsrf_token = response.headers['x-csrf-tokens'];
alert(header_xcsrf_token);
},
function (err) {
});
}