pub fn serialize_header_map_spec(headers: &[(String, String)]) -> Vec<u8> ⓘExpand description
Serialize a list of (key, value) header pairs into the spec/SDK
proxy-wasm wire layout (mirrors the Rust proxy-wasm SDK’s
utils::serialize_map, hostcalls.rs ~line 1265): LE u32 entry
count, then the LE u32 (key_len, value_len) length table, then the
NUL-terminated strings. An empty map serializes to exactly the
4-byte LE count 0 — the bytes the SDK passes for
send_http_response with empty headers.