Api extensions to controllers for the MimeTypes plugin.
Modifiers | Name | Description |
---|---|---|
protected MimeTypesApiSupport |
apiSupport |
Type | Name and description |
---|---|
java.lang.Object |
withFormat(java.lang.Object instance, groovy.lang.Closure callable) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
The withFormat method is used to allow controllers to handle different types of request formats such as HTML, XML and so on. Example usage:
withFormat {
html { render "html" }
xml { render "xml}
}