public static interface HttpMessage.MessageTransformations<Self>
Modifier and Type | Method and Description |
---|---|
Self |
addCredentials(HttpCredentials credentials)
Returns a copy of this message with the given http credential header added to the list of headers.
|
Self |
addHeader(HttpHeader header)
Returns a copy of this message with the given header added to the list of headers.
|
Self |
addHeaders(java.lang.Iterable<HttpHeader> headers)
Returns a copy of this message with the given headers added to the list of headers.
|
Self |
removeHeader(java.lang.String headerName)
Returns a copy of this message with all headers of the given name (case-insensitively) removed.
|
java.util.concurrent.CompletionStage<? extends Self> |
toStrict(long timeoutMillis,
java.util.concurrent.Executor ec,
akka.stream.Materializer materializer)
Returns a CompletionStage of Self message with strict entity that contains the same data as this entity
which is only completed when the complete entity has been collected.
|
java.util.concurrent.CompletionStage<? extends Self> |
toStrict(long timeoutMillis,
long maxBytes,
java.util.concurrent.Executor ec,
akka.stream.Materializer materializer)
Returns a CompletionStage of Self message with strict entity that contains the same data as this entity
which is only completed when the complete entity has been collected.
|
<T> Self |
transformEntityDataBytes(akka.stream.Graph<akka.stream.FlowShape<akka.util.ByteString,akka.util.ByteString>,T> transformer)
Returns a copy of Self message after applying the given transformation
|
Self |
withEntity(byte[] bytes)
Returns a copy of Self message with a new entity.
|
Self |
withEntity(akka.util.ByteString bytes)
Returns a copy of Self message with a new entity.
|
Self |
withEntity(ContentType.NonBinary type,
java.lang.String string)
Returns a copy of Self message with a new entity.
|
Self |
withEntity(ContentType type,
byte[] bytes)
Returns a copy of Self message with a new entity.
|
Self |
withEntity(ContentType type,
akka.util.ByteString bytes)
Returns a copy of Self message with a new entity.
|
Self |
withEntity(ContentType type,
java.io.File file)
Returns a copy of Self message with a new entity.
|
Self |
withEntity(ContentType type,
java.nio.file.Path file)
Returns a copy of Self message with a new entity.
|
Self |
withEntity(RequestEntity entity)
Returns a copy of Self message with a new entity.
|
Self |
withEntity(java.lang.String string)
Returns a copy of this message with a new entity.
|
Self |
withHeaders(java.lang.Iterable<HttpHeader> headers)
Returns a copy of this message with new headers.
|
Self |
withProtocol(HttpProtocol protocol)
Returns a copy of this message with a new protocol.
|
Self withProtocol(HttpProtocol protocol)
Self addHeader(HttpHeader header)
Self addHeaders(java.lang.Iterable<HttpHeader> headers)
Self withHeaders(java.lang.Iterable<HttpHeader> headers)
Self addCredentials(HttpCredentials credentials)
Self removeHeader(java.lang.String headerName)
Self withEntity(java.lang.String string)
Self withEntity(byte[] bytes)
Self withEntity(akka.util.ByteString bytes)
Self withEntity(ContentType.NonBinary type, java.lang.String string)
Self withEntity(ContentType type, byte[] bytes)
Self withEntity(ContentType type, akka.util.ByteString bytes)
Self withEntity(ContentType type, java.io.File file)
Self withEntity(ContentType type, java.nio.file.Path file)
Self withEntity(RequestEntity entity)
<T> Self transformEntityDataBytes(akka.stream.Graph<akka.stream.FlowShape<akka.util.ByteString,akka.util.ByteString>,T> transformer)
java.util.concurrent.CompletionStage<? extends Self> toStrict(long timeoutMillis, java.util.concurrent.Executor ec, akka.stream.Materializer materializer)
java.util.concurrent.CompletionStage<? extends Self> toStrict(long timeoutMillis, long maxBytes, java.util.concurrent.Executor ec, akka.stream.Materializer materializer)