/** * Returns the content type of a request (without an optional encoding). * * @return content type */ public String contentType() { final String ct = req.getContentType(); return ct != null ? ct.replaceFirst(";.*", "") : null; }