Quantcast
Channel: SCN : All Content - SAP for Mobile
Viewing all articles
Browse latest Browse all 6147

Fetch x-CSRF Token using SAPUI5

$
0
0

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) {

        });

}


Viewing all articles
Browse latest Browse all 6147

Trending Articles



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