Methods added to the javax.servlet.http.HttpServletRequest instance for request format handling.
Type | Name and description |
---|---|
MimeTypesApiSupport |
apiSupport |
GrailsApplication |
grailsApplication |
MimeType[] |
mimeTypes |
Constructor and description |
---|
RequestMimeTypesApi
() |
RequestMimeTypesApi
(GrailsApplication application, MimeType[] mimeTypes) |
Type | Name and description |
---|---|
java.lang.String |
getFormat(javax.servlet.http.HttpServletRequest request) Obtains the request format, which is dictated by the CONTENT_TYPE header and evaluated using the configured MimeType instances. |
MimeType[] |
getMimeTypes() |
MimeType[] |
getMimeTypes(javax.servlet.http.HttpServletRequest request) Obtains a list of configured MimeType instances for the request |
java.lang.Object |
withFormat(javax.servlet.http.HttpServletRequest request, groovy.lang.Closure callable) Allows for the request.withFormat { } syntax |
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() |
Obtains the request format, which is dictated by the CONTENT_TYPE header and evaluated using the configured MimeType instances. Only configured MimeTypes are allowed.
request
- The request objectObtains a list of configured MimeType instances for the request
request
- The requestAllows for the request.withFormat { } syntax
request
- The requestcallable
- A closureGroovy Documentation