Interface ReactiveRequest.Content

  • All Superinterfaces:
    org.reactivestreams.Publisher<ContentChunk>
    All Known Implementing Classes:
    PublisherContent, StringContent
    Enclosing class:
    ReactiveRequest

    public static interface ReactiveRequest.Content
    extends org.reactivestreams.Publisher<ContentChunk>
    A Publisher of content chunks that also specifies the content length and type.
    • Method Detail

      • getLength

        long getLength()
        Returns:
        the content length
      • getContentType

        java.lang.String getContentType()
        Returns:
        the content type in the form media_type[;charset=<charset>]
      • fromString

        static ReactiveRequest.Content fromString​(java.lang.String string,
                                                  java.lang.String mediaType,
                                                  java.nio.charset.Charset charset)
      • fromPublisher

        static ReactiveRequest.Content fromPublisher​(org.reactivestreams.Publisher<ContentChunk> publisher,
                                                     java.lang.String mediaType,
                                                     java.nio.charset.Charset charset)