Skip to main content

headers_get

Function headers_get 

Source
pub fn headers_get(headers: Vec<(String, String)>, name: String) -> Dynamic
Available on crate feature http only.
Expand description

Case-insensitive lookup of a single response header by name. headers is the opaque Vec<(String, String)> returned as the headers field of get/post/… results — it carries no rhai-visible indexing or iteration of its own, so this is the only way to read a specific header from a script. Returns () when the header is absent.