cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 - Response object ( response headers) not returned in requestCompleted method for OData Model

sahud
Participant
0 Kudos
429

Hi Experts,

I have an ODataModel (sap.ui.model.odata.v2.ODataModel) bound to a sap.m.Table. The trigger for the service call (to HANA XSOData) is thtough the bindAggregation methos. I have attached the requestcompleted methos to get the statistics back from the server to add to the UI. However, when I check the event linked to requestcompleted, I don't see the response headers in the object. The response object doesn't match what's int he documentation.

Below is what's in the documentation for the return in th event object (sapui5 version --> 1.84.26)

Below is my return object for the requestcompleted method. The "response" and "headers" are missing from the event parameters.

I have checked the OData call in network and the response header I need is being returned correctly

Am I missing something in OData call to UI5? How do I access the response headers in the requestcompleted return. I tried to read through the oSource object as well but couln't find it there

Thanks in Advance.

Best Regards,

Deepak

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

are you sure you are checking at the right place? are you at the event handler?

sahud
Participant
0 Kudos

Hi Jun,

Yeah. I am in the event object that's returned. I can see parameters but those specific parameters for headers and response are not there. Another thing I might add is this is a get service call that I am doing. But was hoping the return object would be the same for all methods.

junwu
Active Contributor
0 Kudos

v2.odatamodel?