Android Question Try to cache HttpJob response

Pooya1

Active Member
Licensed User
I try to use header for cache response and when my network is disactive,i can download from cache
My code is :
B4X:
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?:eek::mad:
 
Top