/** * Transmit each string emitted by the publisher as a chunk. * <p> * The content type of the response is set to {@code text/plain;charset=UTF-8} and each string is decoded as UTF-8. * * @param publisher a publisher of strings * @return a renderable object */ public static ResponseChunks stringChunks(Publisher<? extends CharSequence> publisher) { return stringChunks(HttpHeaderConstants.PLAIN_TEXT_UTF8, CharsetUtil.UTF_8, publisher); }
/** * Transmit each string emitted by the publisher as a chunk. * <p> * The content type of the response is set to the given content type and each string is decoded as UTF-8. * * @param contentType the value for the content-type header * @param publisher a publisher of strings * @return a renderable object */ public static ResponseChunks stringChunks(CharSequence contentType, Publisher<? extends CharSequence> publisher) { return stringChunks(contentType, CharsetUtil.UTF_8, publisher); }