Hi,
Our oDATA service requires a set of custom HTTP header key value pairs to be sent along with each and every the oDATA request. These custom headers are required for an additional or shall I say custom authentication validation. While creating the oDATA Model in SAPUI5 1.12 we have provided the custom headers in the constructor of the oDATA. These custom headers are sent in the $metadata request and also when the service is bound to a table by using Table.bindRows() method.
But the custom HTTP headers are not sent in the $count request and as a consequence this $count request fails. Please see the screen shot given below which shows that $metadata request succeeds and so does the "BankCollection?$skip=0&stop=110&$inline" request. But notice the $count request which has failed, this $count request is given in RED.
Observe the custom HTTP headers key-value pairs, "MyCustomKey:MyCustomValue", highlighted in orange, getting sent in the $metadata request
Also observe that the custom HTTP header key-value pairs "MyCustomKey:MyCustomValue", highlighted in orange, are sent as a part of the, "BankCollection?$skip=0&stop=110&$inline" request, i.e. when the Table.bindRows() method is invoked
But observe the HTTP headers sent with the $count request, as given in the screen shot below. As one can see the custom HTTP Header key-value pairs are not sent along with it.
Why are the custom HTTP Headers not sent along with $count request? Also how can we send custom HTTP Headers along with $count request?
________________________________________
Regards
Amardeep Verma