get

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

How to configure

expect operator fun GrpcMetadata.get(key: String): String?(source)

Returns the last metadata entry added with the given key, or null if there are no entries.

Return

the last value associated with the key, or null if no values exist

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.

Throws

if the key ends with -bin or contains invalid characters


expect operator fun <T> GrpcMetadata.get(key: GrpcMetadataKey<T>): T?(source)

Returns the last metadata entry added with the given typed key, or null if there are no entries.

The value is decoded using the marshaller associated with the key. The marshaller must encode values as ASCII strings (not raw bytes).

Return

the last value associated with the key, decoded using the key's marshaller, or null if no values exist

Parameters

key

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

Type Parameters

T

the type of value associated with the key

Throws

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

actual operator fun GrpcMetadata.get(key: String): String?(source)

Returns the last metadata entry added with the given key, or null if there are no entries.

Return

the last value associated with the key, or null if no values exist

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.

Throws

if the key ends with -bin or contains invalid characters


actual operator fun <T> GrpcMetadata.get(key: GrpcMetadataKey<T>): T?(source)

Returns the last metadata entry added with the given typed key, or null if there are no entries.

The value is decoded using the marshaller associated with the key. The marshaller must encode values as ASCII strings (not raw bytes).

Return

the last value associated with the key, decoded using the key's marshaller, or null if no values exist

Parameters

key

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

Type Parameters

T

the type of value associated with the key

Throws

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

actual operator fun GrpcMetadata.get(key: String): String?(source)

Returns the last metadata entry added with the given key, or null if there are no entries.

Return

the last value associated with the key, or null if no values exist

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.

Throws

if the key ends with -bin or contains invalid characters


actual operator fun <T> GrpcMetadata.get(key: GrpcMetadataKey<T>): T?(source)

Returns the last metadata entry added with the given typed key, or null if there are no entries.

The value is decoded using the marshaller associated with the key. The marshaller must encode values as ASCII strings (not raw bytes).

Return

the last value associated with the key, decoded using the key's marshaller, or null if no values exist

Parameters

key

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

Type Parameters

T

the type of value associated with the key

Throws

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