Closed pedronveloso closed 7 years ago
Remember only @GET requests are cached (have an issue like this today). With given description i can't figure what's happening, a code sample, a failing demo or the complete stack trace could be nice for dig in this error.
@pedronveloso something new about the error?
@iagocanalejas Thank you for the prompt reply. I didn't account for the fact that it was only available for GET requests, my issue was present in a POST one. I eventually did something on my own as most requests I needed caching where POST ones.
@pedronveloso ok, sorry for that, i plan to add support for other requests as i show in #7 but i don't know when i will have time to implement that.
@iagocanalejas no need to be sorry you already did an excellent work by open-sourcing this one. It is a great idea to combine caching with the request, keep at it 👍
I've setup my project as described, but when switching the device to offline I've got the usual:
HTTP FAILED: java.net.UnknownHostException: Unable to resolve host
I've also taken a look at the app's internal directory, and the /cache directory didn't contain anything, suggesting that it failed to persist any changes.
This is the cache I've used:
RetroCache.getDualCache
, and I've tried the other as well. The cache is added to my retrofit builder, and I did replace my Interface methods with CachedCall as well. Not sure what I'm missing here.