문제

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

올바른 솔루션이 없습니다

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top