Extends the HttpServletResponse object with new methods for handling MimeType instances
| Type | Name and description |
|---|---|
private static MimeTypesApiSupport |
apiSupport |
private static java.util.regex.Pattern |
disableForUserAgents |
private static boolean |
useAcceptHeader |
private static boolean |
useAcceptHeaderXhr |
| Constructor and description |
|---|
HttpServletResponseExtension
() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static java.lang.String |
getFormat(HttpServletResponse response)Obtains the format to use for the response using either the file extension or the ACCEPT header
|
|
static MimeType |
getMimeType(HttpServletResponse response)Obtains the MimeType for the response using either the file extension or the ACCEPT header
|
|
static MimeType[] |
getMimeTypes() |
|
static MimeType[] |
getMimeTypes(HttpServletResponse response)Gets the configured mime types for the response
|
|
static MimeType[] |
getMimeTypesFormatAware(HttpServletResponse response)Gets the configured mime types for the response
|
|
static void |
loadMimeTypeConfig(Config config) |
|
static java.lang.Object |
withFormat(HttpServletResponse response, Closure callable)Allows for the response.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 format to use for the response using either the file extension or the ACCEPT header
response - The responseObtains the MimeType for the response using either the file extension or the ACCEPT header
response - The responseGets the configured mime types for the response
response - The responseGets the configured mime types for the response
response - The responseAllows for the response.withFormat { } syntax
response - The responsecallable - A closure