@CompileStatic class HttpServletRequestExtension extends Object
An extension that adds methods to the HttpServletRequest object for mime types
| Modifiers | Name | Description |
|---|---|---|
protected static MimeTypesApiSupport |
apiSupport |
| Constructor and description |
|---|
HttpServletRequestExtension() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static String |
getFormat(HttpServletRequest request)Obtains the request format, which is dictated by the CONTENT_TYPE header and evaluated using the configured MimeType instances. |
|
static MimeType[] |
getMimeTypes(HttpServletRequest request)Obtains a list of configured MimeType instances for the request |
|
static Object |
withFormat(HttpServletRequest request, Closure callable) |
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 request