on 08-11-2014 8:26 AM
Hi all, I am able to get X-CSRF-Token using advanced rest client but was not able to get token from the response header in SAPUI5.This is the code I am using
OData.request
({
requestUri: "http://localhost8080/gateway/odata/sap/ArticleService;v=1",
method: "GET",
headers:
{
"Content-Type": "application/xml",
"X-CSRF-Token":"Fetch" }
},
function (data, response)
{
header_xcsrf_token = response.headers['x-csrf-token'];
alert(header_xcsrf_token);
I am getting undefined in the header,any comments/suggestions are highly appreciated
Best Regards
Sarosh Bilal
I also tried to hard code the value of X-CSRF-Token in post method (which I got from advanced rest client) but it gave me 403 Forbidden error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.