1

I am using HttpURLConnection for communication with server and using HttpResponseCache for caching, when server respond with 304 (HTTP_NOT_MODIFIED), i got empty body, but according to documentation of HttpURLConnection and HttpResponseCache, in case 304 HttpUrlConnection will fetch the response for the same URL in the cache. While the request for url is cached and i confirmed it. when url is called first time i get proper response (data) while after cached when i called url, Why i am getting empty body (no data).

kashif181
  • 315
  • 2
  • 11

1 Answers1

0

I fixed the issue by downloading volley library from official google code repository this is the link https://android.googlesource.com/platform/frameworks/volley/+/master.

Actually the volley source code available at github is customized and cause many issues (github link: https://github.com/mcxiaoke/android-volley), never download from that link.

kashif181
  • 315
  • 2
  • 11