Pooya1 Active Member Licensed User Jan 31, 2018 #1 I try to use header for cache response and when my network is disactive,i can download from cache My code is : Code: Copy Dim ht As HttpJob ht.Initialize("pss",Me) ht.PostString("https://example.com/statistic.txt","") ht.GetRequest.SetHeader("Expires","Wed, 31 Jan 2018 23:48:14 GMT") ht.GetRequest.SetHeader("Cache-Control","max-age=20000,public") But it not working Maybe wrong?
I try to use header for cache response and when my network is disactive,i can download from cache My code is : Code: Copy Dim ht As HttpJob ht.Initialize("pss",Me) ht.PostString("https://example.com/statistic.txt","") ht.GetRequest.SetHeader("Expires","Wed, 31 Jan 2018 23:48:14 GMT") ht.GetRequest.SetHeader("Cache-Control","max-age=20000,public") But it not working Maybe wrong?
Erel B4X founder Staff member Licensed User Longtime User Feb 1, 2018 #2 There is no cache mechanism in OkHttp. You can cache the result yourself. Upvote 0
Pooya1 Active Member Licensed User Feb 1, 2018 #3 Erel said: There is no cache mechanism in OkHttp. You can cache the result yourself. Click to expand... OK Upvote 0
Erel said: There is no cache mechanism in OkHttp. You can cache the result yourself. Click to expand... OK