public class ReactorClientHttpRequest extends AbstractClientHttpRequest
ClientHttpRequest implementation for the Reactor-Netty HTTP client.HttpClient| Constructor and Description |
|---|
ReactorClientHttpRequest(HttpMethod httpMethod,
URI uri,
reactor.ipc.netty.http.HttpClientRequest httpRequest) |
| Modifier and Type | Method and Description |
|---|---|
DataBufferFactory |
bufferFactory()
Returns a
DataBufferFactory that can be used for creating the body. |
HttpMethod |
getMethod()
Return the HTTP method of the request.
|
URI |
getURI()
Return the URI of the request.
|
reactor.core.publisher.Mono<Void> |
setComplete()
Indicate that message handling is complete, allowing for any cleanup or
end-of-processing tasks to be performed such as applying header changes
made via
HttpMessage.getHeaders() to the underlying HTTP message (if not
applied already). |
reactor.core.publisher.Mono<Void> |
writeAndFlushWith(org.reactivestreams.Publisher<org.reactivestreams.Publisher<DataBuffer>> body)
Use the given
Publisher of Publishers to write the body of the
message to the underlying HTTP layer, flushing after each
Publisher<DataBuffer>. |
protected void |
writeCookies() |
protected void |
writeHeaders() |
reactor.core.publisher.Mono<Void> |
writeWith(org.reactivestreams.Publisher<DataBuffer> body)
Use the given
Publisher to write the body of the message to the underlying
HTTP layer. |
applyBeforeCommit, beforeCommit, getCookies, getHeaderspublic ReactorClientHttpRequest(HttpMethod httpMethod, URI uri, reactor.ipc.netty.http.HttpClientRequest httpRequest)
public DataBufferFactory bufferFactory()
ReactiveHttpOutputMessageDataBufferFactory that can be used for creating the body.ReactiveHttpOutputMessage.writeWith(Publisher)public HttpMethod getMethod()
ClientHttpRequestpublic URI getURI()
ClientHttpRequestpublic reactor.core.publisher.Mono<Void> writeWith(org.reactivestreams.Publisher<DataBuffer> body)
ReactiveHttpOutputMessagePublisher to write the body of the message to the underlying
HTTP layer.body - the body content publisherpublic reactor.core.publisher.Mono<Void> writeAndFlushWith(org.reactivestreams.Publisher<org.reactivestreams.Publisher<DataBuffer>> body)
ReactiveHttpOutputMessagePublisher of Publishers to write the body of the
message to the underlying HTTP layer, flushing after each
Publisher<DataBuffer>.body - the body content publisherpublic reactor.core.publisher.Mono<Void> setComplete()
ReactiveHttpOutputMessageHttpMessage.getHeaders() to the underlying HTTP message (if not
applied already).
This method should be automatically invoked at the end of message processing so typically applications should not have to invoke it. If invoked multiple times it should have no side effects.
protected void writeHeaders()
writeHeaders in class AbstractClientHttpRequestprotected void writeCookies()
writeCookies in class AbstractClientHttpRequest