Skip to main content

http_headers_to_grpc_metadata

Function http_headers_to_grpc_metadata 

Source
pub fn http_headers_to_grpc_metadata(
    headers: &HeaderMap,
    forwarded_headers: &[String],
) -> MetadataMap
Expand description

Extract HTTP headers into a gRPC MetadataMap.

Forwards the headers listed in forwarded_headers, then always propagates W3C trace-context (forwarding an incoming traceparent or synthesizing one so the upstream joins a single trace across the REST↔gRPC boundary).