code: static String getConsumedContentType(HttpServletRequest request) {
          String mimeType = firstNotNull(request.getParameter("format"), request
                  .getContentType());
  
          return ((mimeType != null) ? mimeType.replace("application/xml",
                  BaseRestResource.XML) : null);
      }
docs: Return the submitted content type, either through a "format" parameter,
  the HTTP content type header. If the content type is application/xml",
  return "text/xml".
  
  @param request
  @return content type