code: public Optional<String> toContentTypeHeader() {
          return contentType.map(ct -> {
              if (charset.isPresent()) {
                  return ct + "; charset=" + charset.get();
              } else {
                  return ct;
              }
          });
      }
docs: Convert this message protocol to a content type header, if the content type is defined.
  
  @return The message protocol as a content type header.