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 Summary
Modifier and Type Method Description static ReactiveRequest.Content
fromPublisher(org.reactivestreams.Publisher<ContentChunk> publisher, String contentType)
static ReactiveRequest.Content
fromPublisher(org.reactivestreams.Publisher<ContentChunk> publisher, String mediaType, Charset charset)
static ReactiveRequest.Content
fromString(String string, String mediaType, Charset charset)
String
getContentType()
long
getLength()
Methods inherited from interface org.reactivestreams.Publisher
subscribe
-
Method Details
-
getLength
long getLength()- Returns:
- the content length
-
getContentType
String getContentType()- Returns:
- the content type in the form
media_type[;charset=<charset>]
-
fromString
-
fromPublisher
static ReactiveRequest.Content fromPublisher(org.reactivestreams.Publisher<ContentChunk> publisher, String contentType) -
fromPublisher
static ReactiveRequest.Content fromPublisher(org.reactivestreams.Publisher<ContentChunk> publisher, String mediaType, Charset charset)
-