Question

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

No correct solution

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top