class

GRPC::Metadata

Inherits Reference < Object

Metadata represents gRPC metadata (HTTP/2 headers), carrying key-value pairs. Binary-valued keys must end in "-bin" and their values are base64-encoded.

Constructors

new(hash : Hash(String, String))
Source

Instance methods

[]=(key : String, value : String) : String
Source
[]?(key : String) : String | Nil
Source
add(key : String, value : String) : Nil
Source
add_bin(key : String, value : Bytes) : Nil
Source
add_wire(key : String, value : String) : Nil
Source
dup

Returns a shallow copy of this object.

This allocates a new object and copies the contents of self into it.

Source
each
Source
each_value
Source
each_wire
Source
empty?
Source
get(key : String) : String | Nil
Source
get_all(key : String) : Array(String)
Source
get_all_bin(key : String) : Array(Bytes)
Source
get_bin(key : String) : Bytes | Nil
Source
merge!(other : Metadata) : self
Source
set(key : String, value : String) : Nil
Source
set_bin(key : String, value : Bytes) : Nil
Source
to_h
Source

Nested types