Create a http.MethodBuilder for a given destination.
Create a http.MethodBuilder for a given destination.
Create a http.MethodBuilder for a given destination.
Create a http.MethodBuilder for a given destination.
Enables decompression of http content bodies.
Enable HTTP/2
Enable HTTP/2
this will override whatever has been set in the toggle.
Enable the collection of HTTP specific metrics.
Enable the collection of HTTP specific metrics. See http.filter.StatsFilter.
For HTTP1*, configures the max size of headers For HTTP2, sets the MAX_HEADER_LIST_SIZE setting which is the maximum number of uncompressed bytes of header name/values.
For HTTP1*, configures the max size of headers For HTTP2, sets the MAX_HEADER_LIST_SIZE setting which is the maximum number of uncompressed bytes of header name/values. These may be set independently via the .configured API.
Configures the maximum initial line length the client can receive from a server.
Configures the maximum response size that client can receive.
Disable HTTP/2
Disable HTTP/2
this will override whatever has been set in the toggle.
Streaming allows applications to work with HTTP messages that have large (or infinite) content bodies.
Streaming allows applications to work with HTTP messages that have large (or infinite) content bodies.
This method configures fixedLengthStreamedAfter
limit, which effectively turns on
streaming (think withStreaming(true)
). The fixedLengthStreamedAfter
, however, disables
streaming for sufficiently small messages of known fixed length.
If Content-Length
of a message does not exceed fixedLengthStreamedAfter
it is
buffered and its content is available through Request.content or
Request.contentString.
Messages without Content-Length
header are always streamed regardless of their
actual content length and the fixedLengthStreamedAfter
value.
Response.isChunked should be used to determine whether a message is streamed
(isChunked == true
) or buffered (isChunked == false
).
Streaming allows applications to work with HTTP messages that have large (or infinite) content bodies.
Streaming allows applications to work with HTTP messages that have large (or infinite) content bodies.
If enabled
is set to true
, the message content is available through a
com.twitter.io.Reader, which gives the application a handle to the byte stream.
If enabled
is set to false
, the entire message content is buffered up to
maximum allowed message size.
(Since version 2018-10-30) Use withStack(Stack[ServiceFactory[Req, Rep]] => Stack[ServiceFactory[Req, Rep]]) instead