class GRPC::Metadata

Overview

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

Defined in:

grpc/metadata.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(hash : Hash(String, String)) #

[View source]
def self.new #

[View source]

Instance Method Detail

def []=(key : String, value : String) : String #

[View source]
def []?(key : String) : String | Nil #

[View source]
def add(key : String, value : String) : Nil #

[View source]
def add_bin(key : String, value : Bytes) : Nil #

[View source]
def add_wire(key : String, value : String) : Nil #

[View source]
def dup : self #
Description copied from class Reference

Returns a shallow copy of this object.

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


[View source]
def each(&block : String, String -> ) : Nil #

[View source]
def each_value(&block : String, Value -> ) : Nil #

[View source]
def each_wire(&block : String, String -> ) : Nil #

[View source]
def empty? : Bool #

[View source]
def get(key : String) : String | Nil #

[View source]
def get_all(key : String) : Array(String) #

[View source]
def get_all_bin(key : String) : Array(Bytes) #

[View source]
def get_bin(key : String) : Bytes | Nil #

[View source]
def merge!(other : Metadata) : self #

[View source]
def set(key : String, value : String) : Nil #

[View source]
def set_bin(key : String, value : Bytes) : Nil #

[View source]
def to_h : Hash(String, String) #

[View source]