I am hosting a UI5 application on HCP.
UI5 Version 1.30.8 has been recently released, and HCP automatically runs the latest version of UI5.
I have an OData model in my application, on which I performed a "create" (or HTTP POST) on version 1.28.9 successfully.
Since the UI5 upgrade this POST has stopped working.
I get the following error:
![1.png]()
First the "refresh security token" request, which gets a 200 and the CSRF token, followed by the POST. Which isn't even attempted.
The Request:
![2.png]()
In the error handler I got this text: "The following problem occurred: Failed to execute 'send' on 'XMLHttpRequest".
Any ideas why this is happening?
My code is here:
var mODataModel = new sap.ui.model.odata.ODataModel("/ticketupdater"); mODataModel.setDefaultBindingMode(sap.ui.model.BindingMode.TwoWay); oComponent.setModel(mODataModel, "ticket"); mODataModel.refreshSecurityToken(); mODataModel.create("/SEOD_TicketUpdater_BORootCollection", oUpdate Obj, //JSON object for creation { async : false, success : function(oData){ //handle success (code removed) }, error : function(err){ //handle error (code removed) } } );
When I do this POST in a rest client or from an older version UI5 application, the request works perfectly. So it is an issue with doing the POST from this version of UI5, I believe. I cannot see any difference in the OData model control in the SAPUI5 sdk though, for create...