diff --git a/rx-netty/src/main/java/io/reactivex/netty/protocol/http/client/HttpClientRequest.java b/rx-netty/src/main/java/io/reactivex/netty/protocol/http/client/HttpClientRequest.java index 543708c6..0bd82b28 100644 --- a/rx-netty/src/main/java/io/reactivex/netty/protocol/http/client/HttpClientRequest.java +++ b/rx-netty/src/main/java/io/reactivex/netty/protocol/http/client/HttpClientRequest.java @@ -24,6 +24,7 @@ import io.netty.handler.codec.http.HttpRequest; import io.netty.handler.codec.http.HttpVersion; import io.reactivex.netty.serialization.ByteTransformer; +import io.reactivex.netty.serialization.ContentTransformer; import java.nio.charset.Charset; @@ -119,6 +120,10 @@ public HttpClientRequest withRawContentSource(final RawContentSource rawCo setRawContentFactory(new SimpleContentSourceFactory(rawContentSource)); return this; } + + public HttpClientRequest withRawContent(T content, ContentTransformer transformer) { + return withRawContentSource(new SingletonRawSource(content, transformer)); + } public HttpClientRequest withContent(T content) { setContentFactory(new SimpleContentSourceFactory>(new ContentSource.SingletonSource(