public interface GroovyContext extends Context
Context that adds Groovy friendly variants of methods.| Modifier and Type | Method and Description |
|---|---|
void |
byContent(Closure<?> closure)
Responds based on the client's preferred response content type (i.e.
|
void |
byMethod(Closure<?> closure)
Responds based on HTTP method.
|
GroovyContext |
getContext()
Returns this.
|
void |
onClose(Closure<?> closure)
Adds a request close handler.
|
clientError, getByContent, getByMethod, getDirectChannelAccess, getResponse, insert, insert, lastModified, next, next, parse, parse, redirect, redirect, render, respond, resultAction, withErrorHandlingbackground, error, file, getAllPathTokens, getBackground, getBindAddress, getForeground, getPathTokens, getRequest, onCloseGroovyContext getContext()
getContext in interface ContextgetContext in interface MinimalContextvoid byMethod(@DelegatesTo(value=GroovyByMethodHandler.class) Closure<?> closure)
closure - defines the action to take for different HTTP methodsvoid byContent(@DelegatesTo(value=GroovyByContentHandler.class) Closure<?> closure)
closure - defines the action to take for the different content typesvoid onClose(@DelegatesTo(value=RequestOutcome.class,strategy=1) Closure<?> closure)
closure - A closure to call when the request is closed