HttpResponseCache icon indicating copy to clipboard operation
HttpResponseCache copied to clipboard

PUT request method are not caching

Open suji099 opened this issue 11 years ago • 1 comments

Hi , The PUT request methods are not caching i dont understand what is the problem with it ,and the same is not working in the case of using android.net.http.HttpResponseCache.There is no problem with the POST and GET methods.Can you please help me from this issue

suji099 avatar Feb 28 '14 06:02 suji099

Hey, are you sure POST is working for you? I can't get POSTs to work as well, I can see the reason in the code:

if (requestMethod.equals(HttpEngine.POST)
            || requestMethod.equals(HttpEngine.PUT)
            || requestMethod.equals(HttpEngine.DELETE)) {
        try {
            cache.remove(key);
        } catch (IOException ignored) {
            // The cache cannot be written.
        }
        return null;

can anybody tell me what is the complexity of supporting POST requests as well? any good reason to not cache them?

marmor7 avatar Feb 02 '15 13:02 marmor7