code: private ContentType getAcceptType() {
          // If the format header is present, it overrides the ACCEPT header.
          String format = m_variableMap.get("format");
          if (format != null) {
              return new ContentType(format);
          }
          String acceptParts = m_request.getHeader(HttpDefs.ACCEPT);
          if (!Utils.isEmpty(acceptParts)) {
  	        for (String acceptPart : acceptParts.split(",")) {
  	            ContentType acceptType = new ContentType(acceptPart);
  	            if (acceptType.isJSON() || acceptType.isXML() || acceptType.isPlainText()) {
  	                return acceptType;
  	            }
  	        }
          }
          return getContentType();
      }
docs: Get the request's accept type, defaulting to content-type if none is specified.