MCPcopy Create free account
hub / github.com/d0iasm/saba / header_value

Method header_value

core/src/http.rs:100–108  ·  view source on GitHub ↗
(&self, name: &str)

Source from the content-addressed store, hash-verified

98 }
99
100 pub fn header_value(&self, name: &str) -> Result<String, String> {
101 for h in &self.headers {
102 if h.name == name {
103 return Ok(h.value.clone());
104 }
105 }
106
107 Err(format!("failed to find {} in headers", name))
108 }
109}
110
111#[cfg(test)]

Callers 2

handle_urlFunction · 0.80
handle_urlFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected