code: public boolean is(@NotNull String type) {
          String ct = getHeader("Content-Type");
          if (ct == null) {
              return false;
          }
          // get the content type only (exclude charset)
          ct = ct.split(";")[0];
  
          // if we received an incomplete CT
          if (type.indexOf('/') == -1) {
              // when the content is incomplete we assume */type, e.g.:
              // json -> */json
              type = "*/" + type;
          }
  
          // process wildcards
          if (type.contains("*")) {
              String[] parts = type.split("/");
              String[] ctParts = ct.split("/");
              return "*".equals(parts[0]) && parts[1].equals(ctParts[1]) || "*".equals(parts[1]) && parts[0].equals(ctParts[0]);
  
          }
  
          return ct.contains(type);
      }
docs: Check if the incoming request contains the "Content-Type"
  header field, and it contains the give mime `type`.
  
  Examples:
  
  // With Content-Type: text/html; charset=utf-8
  req.is('html');
  req.is('text/html');
  req.is('text/*');
  // returns true
  
  // When Content-Type is application/json
  req.is('json');
  req.is('application/json');
  req.is('application/*');
  // returns true
  
  req.is('html');
  // returns false
  
  @param type content type
  @return true if content type is of type