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,047
  • 19
  • 89
  • 176

1 Answers1

4

Take a look at setRequestHeaders() method https://developers.google.com/appengine/docs/java/urlfetch/usingjavanet#Setting_Request_Headers

Onur A.
  • 2,981
  • 3
  • 21
  • 36