Jersey has wonderful support for server-side handling of Preconditions to respond to a Conditional-GET-request.
On the client-side it seems a bit less elegant/manual. As far as I know you'd need to store the metadata of the entity yourself (etag, last-modified header) and make a decision, when to set which headers, evaluate the response code, update your local cache of entity/metadata ... etc.
Do you know of a ready, free implementation that wraps up the conditonal GET? I found this example, where the poster is using CacheManager
and CacheEntry
; I suspect his own implementation. Shouldn't this be part of Jersey Client itself?
Maybe it should be part of the Jersey Client itself. You can register interest here: JERSEY-100 The ticket is closed because "it has collected only 1 support votes and has not been updated" in 2015. I am "watching" this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With