public interface GroovyByContentSpec extends ByContentSpec
ByContentSpec
.Modifier and Type | Method and Description |
---|---|
GroovyByContentSpec |
html(Closure<?> closure)
Convenience method to respond with "text/html" mime type.
|
GroovyByContentSpec |
json(Closure<?> closure)
Convenience method to respond with "application/json" mime type.
|
GroovyByContentSpec |
plainText(Closure<?> closure)
Convenience method to respond with "text/plain" mime type.
|
GroovyByContentSpec |
type(String mimeType,
Closure<?> closure)
Register how to respond with the given mime type.
|
GroovyByContentSpec |
xml(Closure<?> closure)
Convenience method to respond with "application/xml" mime type.
|
GroovyByContentSpec 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 typeGroovyByContentSpec plainText(@DelegatesTo(value=GroovyContext.class) Closure<?> closure)
closure
- the action to take if the client wants plain textGroovyByContentSpec html(@DelegatesTo(value=GroovyContext.class) Closure<?> closure)
closure
- the action to take if the client wants htmlGroovyByContentSpec json(@DelegatesTo(value=GroovyContext.class) Closure<?> closure)
closure
- the action to take if the client wants jsonGroovyByContentSpec xml(@DelegatesTo(value=GroovyContext.class) Closure<?> closure)
closure
- the action to take if the client wants xml