openui5
openui5 copied to clipboard
sap.ui.model.odata.v2.ODataModel - Custom Headers not set in $metadata request
Hi,
I think there is a bug in the new v2.ODataModel. Custom headers are not included in the metadata request, which is sent automatically after initializing the model.
Versions tested: 1.26.10 (stable), 1.28.4 (unstable) Tested with: Chrome
Example:
var _url = "xxx";
var _headers = {
"X-SMP-APPCID": "xxx"
};
var oModel = new sap.ui.model.odata.v2.ODataModel(_url, {
user: "xxx",
password: "xxx",
headers: _headers
});
Hi Christian,
thanks for reporting this issue. I created an internal ticket: 1570173039 We will let you know once this issue is fixed.
Kind regards, Janina
Hi Christian, the issue is fixed with commit: https://github.com/SAP/openui5/commit/723741dcd7428c351c836096fc19609a8be9b0ba BR, Jan