public interface ByContentSpec
Context.byContent(ratpack.func.Action)| Modifier and Type | Method and Description |
|---|---|
ByContentSpec |
html(NoArgAction handler)
Specifies that the given handler should be used if the client wants content of type "text/html".
|
ByContentSpec |
json(NoArgAction handler)
Specifies that the given handler should be used if the client wants content of type "application/json".
|
ByContentSpec |
plainText(NoArgAction handler)
Specifies that the given handler should be used if the client wants content of type "text/plain".
|
ByContentSpec |
type(String mimeType,
NoArgAction handler)
Specifies that the given handler should be used if the client wants content of the given mime type.
|
ByContentSpec |
xml(NoArgAction handler)
Specifies that the given handler should be used if the client wants content of type "application/xml".
|
ByContentSpec type(String mimeType, NoArgAction handler)
mimeType - The mime type to register forhandler - The handler to invoke if the content type matchesByContentSpec plainText(NoArgAction handler)
handler - The handler to invoke if the content type matchesByContentSpec html(NoArgAction handler)
handler - The handler to invoke if the content type matchesByContentSpec json(NoArgAction handler)
handler - The handler to invoke if the content type matchesByContentSpec xml(NoArgAction handler)
handler - The handler to invoke if the content type matches