1

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()
Kaloyan Roussev
  • 14,515
  • 21
  • 98
  • 180

1 Answers1

5

Take a look at setRequestProperty() method

rekire
  • 47,260
  • 30
  • 167
  • 264
Onur A.
  • 3,007
  • 3
  • 22
  • 37