View Full Version : Compression support
Apr 25th, 2011, 04:27 PM
I'm gonna probably have to hack something in for now but considering that this same request has been made in the vanilla spring RestTemplate can we possibly get this feature request added for the spring android project as well?
May 18th, 2011, 08:14 AM
Thanks for the feedback. I think this would be a valuable addition. I've added a story in Spring Android for this as well. The implementation my differ from SpringWEB, so I'm going to track it separately.
May 18th, 2011, 09:14 AM
Just as an FYI, since I've implemented this on my own...
In addition to adding the ability to set the accepts header in the HTTP request, you also need to add the support for uncompressing the payload before passing it to one of the normal message converters.
In my case, I just created a converter that wraps the single converter that I want to use (JSON) and then delegates to that converter with the uncompressed content. Note that though converters are designed to convert in both directions, I did not implement sending compressed content up to the server.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.