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(Publisher<? extends Publisher<? extends DataBuffer>> body)
Invoke
ServerHttpResponseDecorator.setComplete() without writing. |
reactor.core.publisher.Mono<Void> |
writeWith(Publisher<? extends DataBuffer> body)
Consume and release the body without writing.
|
addCookie, beforeCommit, bufferFactory, getCookies, getDelegate, getHeaders, getNativeResponse, getRawStatusCode, getStatusCode, isCommitted, setComplete, setRawStatusCode, setStatusCode, toString
public HttpHeadResponseDecorator(ServerHttpResponse delegate)
public final reactor.core.publisher.Mono<Void> writeWith(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(Publisher<? extends 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