I have a WCF Data Service that sends data with GZip. I intend to use odata4j to read that compressed stream. If it is not compressed, it works fine. What should I modify to be able to read the compressed stream via odata4j?
Here is the C# code that compresses the stream:
HttpContext httpContext = HttpContext.Current;
if (httpContext != null)
httpContext.Response.Filter = new GZipStream(httpContext.Response.Filter, CompressionMode.Compress);
And here is the Odata4j part that reads the data:
ODataConsumer consumer = ODataJerseyConsumer.create(url);
List<OEntity> listEntities=consumer.getEntities("Data")
.execute().toList();