Package com.linecorp.armeria.common
Interface HttpMessageSetters
- All Known Subinterfaces:
HttpRequestSetters
,RequestPreparationSetters
- All Known Implementing Classes:
AbstractHttpMessageBuilder
,AbstractHttpRequestBuilder
,BlockingWebClientRequestPreparation
,FutureTransformingRequestPreparation
,HttpRequestBuilder
,HttpResponseBuilder
,RestClientPreparation
,TransformingRequestPreparation
,WebClientRequestPreparation
Sets properties for building an
HttpMessage
.-
Method Summary
Modifier and TypeMethodDescriptionSets the content for this message.Sets the content for this message.content
(MediaType contentType, CharSequence content) Sets the content for this message.Sets the content for this message.Sets the content for this message.Sets thePublisher
for this message.Sets the content as UTF-8 for this message.Sets the content as UTF-8 for this message.Sets thePublisher
for this message.contentJson
(Object content) Sets the content for this message.Sets a cookie for this message.Sets multiple cookies for this message.header
(CharSequence name, Object value) Adds a header for this message.headers
(Iterable<? extends Map.Entry<? extends CharSequence, String>> headers) Adds multiple headers for this message.trailer
(CharSequence name, Object value) Adds an HTTP trailer for this message.trailers
(Iterable<? extends Map.Entry<? extends CharSequence, String>> trailers) Adds HTTP trailers for this message.
-
Method Details
-
content
Sets the content as UTF-8 for this message. -
content
Sets the content for this message. -
content
Sets the content for this message. -
content
Sets the content as UTF-8 for this message. Thecontent
is formatted byString.format(Locale, String, Object...)
with English locale. -
content
@FormatMethod HttpMessageSetters content(MediaType contentType, @FormatString String format, Object... content) Sets the content for this message. Thecontent
is formatted byString.format(Locale, String, Object...)
with English locale. -
content
Sets the content for this message. Thecontent
will be wrapped usingHttpData.wrap(byte[])
, so any changes made tocontent
will be reflected in the request. -
content
Sets the content for this message. -
content
Sets thePublisher
for this message. -
content
HttpMessageSetters content(MediaType contentType, org.reactivestreams.Publisher<? extends HttpData> content) Sets thePublisher
for this message. -
contentJson
Sets the content for this message. Thecontent
is converted into JSON format using the defaultObjectMapper
. -
header
Adds a header for this message. -
headers
Adds multiple headers for this message.- See Also:
-
trailer
Adds an HTTP trailer for this message. -
trailers
Adds HTTP trailers for this message. -
cookie
Sets a cookie for this message.- See Also:
-
cookies
Sets multiple cookies for this message.- See Also:
-