(&self, name: &str)
| 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)] |
no outgoing calls
no test coverage detected