rest icon indicating copy to clipboard operation
rest copied to clipboard

Enhancement Proposal: *Context.cacheControl()

Open mkarg opened this issue 3 months ago • 6 comments

Recently we deprecated CacheControl.valueOf(String), but the replacement is a rather clumsy code line: RuntimeDelegate.getInstance().createHeaderDelegate(CacheControl.class).fromString(value). This is very annoying e. g. when migrating filters from 2.x to 3.x.

To make the programmer's life easier, I like to propose that we add support for some syntactic sugar:

  • Add new method cacheControl() on Client/Server Request/Response Context returning a modifiable instance of CacheControl initialized by the content of the Cache-Control header.

mkarg avatar Nov 19 '24 16:11 mkarg