public interface GroovyByMethodHandler extends ByMethodHandler
ByMethodHandler
that makes using closures more convenient.Modifier and Type | Method and Description |
---|---|
GroovyByMethodHandler |
delete(Closure<?> closure)
Defines the action to to take if the request has a HTTP method of DELETE.
|
GroovyByMethodHandler |
get(Closure<?> closure)
Defines the action to to take if the request has a HTTP method of GET.
|
GroovyByMethodHandler |
named(String methodName,
Closure<?> closure)
Defines the action to to take if the request has a HTTP method of
methodName . |
GroovyByMethodHandler |
patch(Closure<?> closure)
Defines the action to to take if the request has a HTTP method of PATCH.
|
GroovyByMethodHandler |
post(Closure<?> closure)
Defines the action to to take if the request has a HTTP method of POST.
|
GroovyByMethodHandler |
put(Closure<?> closure)
Defines the action to to take if the request has a HTTP method of PUT.
|
GroovyByMethodHandler get(@DelegatesTo(value=GroovyContext.class) Closure<?> closure)
closure
- The action to takeGroovyByMethodHandler post(@DelegatesTo(value=GroovyContext.class) Closure<?> closure)
closure
- The action to takeGroovyByMethodHandler put(@DelegatesTo(value=GroovyContext.class) Closure<?> closure)
closure
- The action to takeGroovyByMethodHandler patch(@DelegatesTo(value=GroovyContext.class) Closure<?> closure)
closure
- The action to takeGroovyByMethodHandler delete(@DelegatesTo(value=GroovyContext.class) Closure<?> closure)
closure
- The action to takeGroovyByMethodHandler named(String methodName, @DelegatesTo(value=GroovyContext.class) Closure<?> closure)
methodName
.
The method name is case insensitive.
methodName
- The HTTP method to map the given action toclosure
- The action to take