I have a Windows Phone 7 application that is utilizing the DataServicesClient to access a WCF DataService (ODATA) and I want to ask the service to compress the response.
I know if the Request Headers includes "Accept-Encoding" header with the value of "gzip" the WCF DS will compress the response.
Is there a way to add this header to the Request when using the DataServicesClient on WP7? The Request Headers collection appears to be readonly. What I would like to be able to do is the following (but the Headers property does not have an Add method in this context.)
void entities_SendingRequest(object sender, SendingRequestEventArgs e) { e.Headers.Add("Accept-Encoding", "gzip"); }
- Michael