Hi,
I'm using a oData Batch Submit for one of my applications in SAP UI5. And my oData service is made public (locally) using SICF.
Now when I run the oModel.submitBatch() it goes to error function and shows me the below error:
HTTP request failed403,Forbidden,CSRF token validation failed -
I did spend sometime in setting the headers to fetch X-CSRF-Token but didn't help me in any way as the oData service is not being authenticated from application/browser level.. so that we could get the token and use it while making the batchSubmit().
JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.model.odata.ODataModel
and while referring to the API above: Private headers which are set in the ODataModel cannot be modified. These private headers are: accept, accept-language, x-csrf-token, MaxDataServiceVersion, DataServiceVersion.
So is there any other way to get rid of this issue? Please let me know if there are any alternative way to setHeader with token or make the submitBatch() run wihtout any issues.
Thanks in advance,
MS