public void byContent(Closure<?> closure) throws Exception {
Map<String, Handler> handlers = new LinkedHashMap<>(2);
ByContentSpec delegate = new DefaultByContentSpec(handlers);
GroovyByContentSpec spec = new DefaultGroovyByContentSpec(delegate);
ClosureUtil.configureDelegateFirst(spec, closure);
new ContentNegotiationHandler(handlers).handle(this);
}