(res: &'a str, header: &'a str)
| 74 | } |
| 75 | |
| 76 | fn get_header<'a>(res: &'a str, header: &'a str) -> Option<&'a str> { |
| 77 | let header_str = format!("{header}: "); |
| 78 | res.find(&header_str) |
| 79 | .map(|o| &res[o + header_str.len()..o + res[o..].find('\r').unwrap()]) |
| 80 | } |
| 81 | |
| 82 | fn get_status_code(res: &str) -> Result<StatusCode, Error> { |
| 83 | if let Some(o) = res.find("HTTP/1.1") { |
no test coverage detected