Skip to main content

parse_add_headers

Function parse_add_headers 

Source
fn parse_add_headers(
    config: &HashMap<String, Value>,
) -> Result<HashMap<String, String>, String>
Expand description

Accepts both config shapes for add_headers:

  • map form (YAML): add_headers: { x-foo: bar }
  • array form (UI editor): add_headers: [{ name: x-foo, value: bar }]

Scalar values (numbers, bools) are stringified; array entries with a blank name are skipped; any other shape is an error at config load.