public interface GroovyByContentHandler extends ByContentHandler
ByContentHandler
.Modifier and Type | Method and Description |
---|---|
GroovyByContentHandler |
html(Closure<?> closure)
Convenience method to respond with "text/html" mime type.
|
GroovyByContentHandler |
json(Closure<?> closure)
Convenience method to respond with "application/json" mime type.
|
GroovyByContentHandler |
plainText(Closure<?> closure)
Convenience method to respond with "text/plain" mime type.
|
GroovyByContentHandler |
type(String mimeType,
Closure<?> closure)
Register how to respond with the given mime type.
|
GroovyByContentHandler |
xml(Closure<?> closure)
Convenience method to respond with "application/xml" mime type.
|
GroovyByContentHandler type(String mimeType, @DelegatesTo(value=GroovyContext.class) Closure<?> closure)
mimeType
- The mime type to register forclosure
- The action to take if the client wants to given typeGroovyByContentHandler plainText(@DelegatesTo(value=GroovyContext.class) Closure<?> closure)
closure
- the action to take if the client wants plain textGroovyByContentHandler html(@DelegatesTo(value=GroovyContext.class) Closure<?> closure)
closure
- the action to take if the client wants htmlGroovyByContentHandler json(@DelegatesTo(value=GroovyContext.class) Closure<?> closure)
closure
- the action to take if the client wants jsonGroovyByContentHandler xml(@DelegatesTo(value=GroovyContext.class) Closure<?> closure)
closure
- the action to take if the client wants xml