Package com.linecorp.armeria.common
Interface AggregatedHttpMessage
- All Known Subinterfaces:
AggregatedHttpRequest
,AggregatedHttpResponse
,PooledAggregatedHttpRequest
,PooledAggregatedHttpResponse
public interface AggregatedHttpMessage
A complete HTTP message whose content is readily available as a single
HttpData
. It can be an
HTTP request or an HTTP response depending on what header values it contains. For example, having a
HttpHeaderNames.STATUS
header could mean it is an HTTP response.-
Method Summary
Modifier and Type Method Description HttpData
content()
Returns the content of this message.default String
content(Charset charset)
Returns the content of this message as a string encoded in the specifiedCharset
.default String
contentAscii()
Returns the content of this message as an ASCII string.default MediaType
contentType()
Returns the value of the'content-type'
header.default String
contentUtf8()
Returns the content of this message as a UTF-8 string.HttpHeaders
headers()
Returns the HTTP headers.HttpHeaders
trailers()
Returns the HTTP trailers.
-
Method Details
-
headers
HttpHeaders headers()Returns the HTTP headers. -
trailers
HttpHeaders trailers()Returns the HTTP trailers. -
content
HttpData content()Returns the content of this message. -
content
Returns the content of this message as a string encoded in the specifiedCharset
. -
contentUtf8
Returns the content of this message as a UTF-8 string. -
contentAscii
Returns the content of this message as an ASCII string. -
contentType
Returns the value of the'content-type'
header.- Returns:
- the valid header value if present, or
null
otherwise.
-