2

I am getting a collection of books from an external resource. For that i am using a call like

response = book_resource.get_books({headers:{"If-Modified-Since" => last-update-date.httpdate}})

In last-update-date i saved the value of last-modified from the header of previous response. But i am always getting the status code as 200 and instead of 304 not modified.But when i tried with etag using the following code.

 response = book_resource.get_books({headers:{"If-None-Match" => "etag"}})

The above is working fine and returning 304 not modified. Kindly help me what i am missing with modified since

Gavis
  • 117
  • 11
  • make sure the date format is exactly the same as required. As something similar happened to me using amazon api and was stuck for days until i realised just needed to add hh:ss (complete datetime stamp). – confusedMind Jul 30 '13 at 00:06

1 Answers1

0

Which tool you use to send HTTP request? Lookup docs to see how to send customized header. For example, here is how to add headers in httprb.

Juanito Fatas
  • 9,419
  • 9
  • 46
  • 70