Package com.linecorp.armeria.common
Interface SplitHttpResponse
public interface SplitHttpResponse
An
HttpResponse
which splits a stream of HttpObject
s into HTTP headers and payloads.
headers()
will be completed before publishing the first HttpData
.
trailers()
might not complete until the entire response body is consumed completely.
Note that
informational
headers are not collected by this HttpResponse
. If you want to get informational headers,
use StreamMessage.subscribe(Subscriber)
instead.
-
Method Summary
Modifier and TypeMethodDescriptionbody()
Returns aStreamMessage
publishes HTTP payloads as a stream ofHttpData
.headers()
Returns aCompletableFuture
completed with a non-informationalResponseHeaders
.trailers()
Returns aCompletableFuture
completed with a trailers.
-
Method Details
-
headers
CompletableFuture<ResponseHeaders> headers()Returns aCompletableFuture
completed with a non-informationalResponseHeaders
. -
body
Returns aStreamMessage
publishes HTTP payloads as a stream ofHttpData
. -
trailers
CompletableFuture<HttpHeaders> trailers()Returns aCompletableFuture
completed with a trailers. If anHttpResponse
does not contain trailers, the returnedCompletableFuture
will be completed with an empty headers.
-