mapSettings
Description
Transforms the RoutingSettings
with a Function<RoutingSettings, RoutingSettings>
.
See also withSettings or extractSettings.
Example
final Route route = mapSettings(settings ->
settings.withFileGetConditional(false), () ->
extractSettings(settings ->
complete("RoutingSettings.fileGetConditional = " + settings.getFileGetConditional())
)
);
// tests:
testRoute(route).run(HttpRequest.GET("/"))
.assertEntity("RoutingSettings.fileGetConditional = false");