Hi,
FunctionImport methods generated by odatagen tool use the excecuteServiceOperation method of the ObjectContext class.
I need to add some RequestHeaders to the request so I used setCustomHeaders to do that however it turns out that executeserviceOperation ignores the custom headers when calling executeHTTPRequest (ObjectContext.m line 740).
My suggestion would be (ObjectContext.m line 740):
if ([self.m_customHeaders count] > 0) {
httpRequest = [self executeHTTPRequest:[queryComponents getUri] httpmethod:aHttpMethod httpbody:nil etag:nil customHeaders:self.m_customHeaders];
}
else httpRequest = [self executeHTTPRequest:[queryComponents getUri] httpmethod:aHttpMethod httpbody:nil etag:nil];
thanks,
Guy