I'm looking for a good HTTP library for my android app. I've been using AsyncHTTP
by loopj (and I've only ever used that), but it's making my app crash when the network connection is lost. Also, it doesn't meet my requirements well. So far, I've found okhttp
by Square and volley
by Google. But I'm not sure which suits my purposes better. The following would be my requirements,
- Small frequent http request for JSON results
- JSON parsing
- Async operation with callback methods
- Caching, with functionality for force re-fetch
Some insights into how these differ and what I should be using, would be immensely helpful.
Combination of Robospice and Google Http Client/Spring/Retrofit (your choise) is what you are looking for. RoboSpice perform async requests by using one of this networking library with respect to Activity/Fragment lifecycle and also handle caching. JSON are parsed by this libraries.