I need to send a header If-Modified-Since to this address and only download if the server returns 200 not 304. Is there a way I can add/modify the header in this code?
new java.net.URL(API.JSON_ZIP_OF_ALL_FILES).openStream()
I need to send a header If-Modified-Since to this address and only download if the server returns 200 not 304. Is there a way I can add/modify the header in this code?
new java.net.URL(API.JSON_ZIP_OF_ALL_FILES).openStream()
Take a look at setRequestProperty()
method