code: private void setContentType(String contentType) {
          // The content type may contain the charset, parse it and set it.
          if (contentType != null && contentType.contains("charset=")) {
              charset = Charset.forName(contentType.substring(contentType.indexOf("charset=") + 8).trim());
          }
          headers.put(HeaderNames.CONTENT_TYPE, contentType);
      }
docs: Sets the value of the {@literal Content-Type} header.
  
  @param contentType the value