Skip to Content
Former Member
Jun 22, 2016 at 11:06 AM

How to make create call from SAPUI5 application for X-CSRF-Token enabled service


I have service hosted on SAP server, and GET call is working fine.

I need to do POST call using oModel.Create() call. Issue is that Create works in Rest client where i have to do a get with X-CSRF-Token and then i have to do POST using fetched token.

In UI5 app, read does not return any token, I read documentation and it said, oDataModel takes care of X-CSRF-Token.

I need help with sample code to see how oModel.create() can work in my case?