Class MediaType.WithOpenCharset

    • Constructor Detail

      • WithOpenCharset

        public WithOpenCharset​(java.lang.String _mainType,
                               java.lang.String _subType)
    • Method Detail

      • toContentTypeWithMissingCharset

        public ContentType.WithMissingCharset toContentTypeWithMissingCharset()
        Turns the media type into a content type without specifying a charset.

        This is generally NOT what you want, since you're hiding the actual character encoding of your content, making decoding it possibly ambiguous.

        Consider using toContentType(charset: HttpCharset) instead.

        JAVA API

        Specified by:
        toContentTypeWithMissingCharset in interface MediaType.WithOpenCharset
        Returns:
        (undocumented)
      • withMissingCharset

        public ContentType.WithMissingCharset withMissingCharset()
        Turns the media type into a content type without specifying a charset.

        This is generally NOT what you want, since you're hiding the actual character encoding of your content, making decoding it possibly ambiguous.

        Consider using toContentType(charset: HttpCharset) instead.

        Returns:
        (undocumented)