append

Available in a dev version: 0․11․0-grpc-186

How to configure

expect fun GrpcMetadata.append(key: String, value: String)(source)

Appends a metadata entry with the given key and value.

If the key already has values, the new value is added to the end of the list. Duplicate values for the same key are permitted.

Parameters

key

the name of the metadata entry (case-insensitive). Must contain only digits (0-9), lowercase letters (a-z), and special characters (-, _, .). Must not end with -bin.

value

the ASCII string value to add. Non-ASCII characters will be replaced with ?.

Throws

if the key contains invalid characters or ends with -bin


expect fun <T> GrpcMetadata.append(key: GrpcMetadataKey<T>, value: T)(source)

Appends a metadata entry with the given typed key and value.

The value is encoded using the marshaller associated with the key. The marshaller must encode values as ASCII strings (not raw bytes). If the key already has values, the new value is added to the end of the list. Duplicate values for the same key are permitted.

Parameters

key

the typed metadata key. The key name must not end with -bin.

value

the value to add, which will be encoded using the key's marshaller

Type Parameters

T

the type of value associated with the key

Throws

if the key name contains invalid characters or ends with -bin

actual fun GrpcMetadata.append(key: String, value: String)(source)

Appends a metadata entry with the given key and value.

If the key already has values, the new value is added to the end of the list. Duplicate values for the same key are permitted.

Parameters

key

the name of the metadata entry (case-insensitive). Must contain only digits (0-9), lowercase letters (a-z), and special characters (-, _, .). Must not end with -bin.

value

the ASCII string value to add. Non-ASCII characters will be replaced with ?.

Throws

if the key contains invalid characters or ends with -bin


actual fun <T> GrpcMetadata.append(key: GrpcMetadataKey<T>, value: T)(source)

Appends a metadata entry with the given typed key and value.

The value is encoded using the marshaller associated with the key. The marshaller must encode values as ASCII strings (not raw bytes). If the key already has values, the new value is added to the end of the list. Duplicate values for the same key are permitted.

Parameters

key

the typed metadata key. The key name must not end with -bin.

value

the value to add, which will be encoded using the key's marshaller

Type Parameters

T

the type of value associated with the key

Throws

if the key name contains invalid characters or ends with -bin

actual fun GrpcMetadata.append(key: String, value: String)(source)

Appends a metadata entry with the given key and value.

If the key already has values, the new value is added to the end of the list. Duplicate values for the same key are permitted.

Parameters

key

the name of the metadata entry (case-insensitive). Must contain only digits (0-9), lowercase letters (a-z), and special characters (-, _, .). Must not end with -bin.

value

the ASCII string value to add. Non-ASCII characters will be replaced with ?.

Throws

if the key contains invalid characters or ends with -bin


actual fun <T> GrpcMetadata.append(key: GrpcMetadataKey<T>, value: T)(source)

Appends a metadata entry with the given typed key and value.

The value is encoded using the marshaller associated with the key. The marshaller must encode values as ASCII strings (not raw bytes). If the key already has values, the new value is added to the end of the list. Duplicate values for the same key are permitted.

Parameters

key

the typed metadata key. The key name must not end with -bin.

value

the value to add, which will be encoded using the key's marshaller

Type Parameters

T

the type of value associated with the key

Throws

if the key name contains invalid characters or ends with -bin