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?
Comments
Post a Comment