public class HttpHeadResponseDecorator extends ServerHttpResponseDecorator
ServerHttpResponse
decorator for HTTP HEAD requests.Constructor and Description |
---|
HttpHeadResponseDecorator(ServerHttpResponse delegate) |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Void> |
writeAndFlushWith(org.reactivestreams.Publisher<? extends org.reactivestreams.Publisher<? extends DataBuffer>> body)
Invoke
ServerHttpResponseDecorator.setComplete() without writing. |
reactor.core.publisher.Mono<Void> |
writeWith(org.reactivestreams.Publisher<? extends DataBuffer> body)
Consume and release the body without writing.
|
addCookie, beforeCommit, bufferFactory, getCookies, getDelegate, getHeaders, getNativeResponse, getStatusCode, isCommitted, setComplete, setStatusCode, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRawStatusCode, setRawStatusCode
public HttpHeadResponseDecorator(ServerHttpResponse delegate)
public final reactor.core.publisher.Mono<Void> writeWith(org.reactivestreams.Publisher<? extends DataBuffer> body)
If the headers contain neither Content-Length nor Transfer-Encoding,
and the body is a Mono
, count the bytes and set Content-Length.
writeWith
in interface ReactiveHttpOutputMessage
writeWith
in class ServerHttpResponseDecorator
body
- the body content publisherMono
that indicates completion or errorpublic final reactor.core.publisher.Mono<Void> writeAndFlushWith(org.reactivestreams.Publisher<? extends org.reactivestreams.Publisher<? extends DataBuffer>> body)
ServerHttpResponseDecorator.setComplete()
without writing.
RFC 7302 allows HTTP HEAD response without content-length and it's not something that can be computed on a streaming response.
writeAndFlushWith
in interface ReactiveHttpOutputMessage
writeAndFlushWith
in class ServerHttpResponseDecorator
body
- the body content publisherMono
that indicates completion or error