Quantcast
Channel: SCN : All Content - SAP Gateway
Viewing all articles
Browse latest Browse all 2823

OData doesn't return CSRF token, why?

$
0
0

Hello Experts,

 

Why does my gateway system not return X-CSRF-Token? It comes undefined. What system settings do I need to check?

Please advise.

 

ques1.png

 

oModel = new sap.ui.model.odata.ODataModel(serviceUrl, true, "USER", 'PASS');

OData.request({

       requestUri: serviceUrl + filter,

       method: "GET",

       dataType: 'json',

       user: "USER", password: "PASS",

       headers:

        {

           "X-Requested-With": "XMLHttpRequest",

           "Content-Type": "application/json; charset=utf-8",

           "DataServiceVersion": "2.0",

           "X-CSRF-Token":"Fetch"  

       }         

     },

     function (data, response){

     csrftokenGlobal = response.headers['x-csrf-token'];     // undefined

     },

     function(err){}

     );

 

Thank you,
Seyed Ismail


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>