AcceptHeaderParser (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.codehaus.groovy.grails.web.mime
[Groovy] Interface AcceptHeaderParser

    interface AcceptHeaderParser

Defines an interface for classes that parse the HTTP Accept header into a set or MimeType definitions ordered by priority.

The ordering is based on the order they appear in the Accept header as well as the 'q' (for quality) parameter. A mime type definition of 'text/xml;q=0.6' will have a higher priorty than 'text/html' due to the q parameter

Authors:
  Graeme Rocher

Since:
  1.0

Method Summary
`MimeType[]` | `parse(java.lang.String header)` Parses an Accept header into an ordered array of MimeType definitions
`MimeType[]` | `parse(java.lang.String header, MimeType fallbackMimeType)` Parses an Accept header into an ordered array of MimeType definitions

Method Detail

### parse

    MimeType[] parse(java.lang.String header)

  Parses an Accept header into an ordered array of MimeType definitions

### parse

    MimeType[] parse(java.lang.String header, MimeType fallbackMimeType)

  Parses an Accept header into an ordered array of MimeType definitions

Groovy Documentation