MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / header_value

Function header_value

packages/server/src/devtools.rs:1106–1113  ·  view source on GitHub ↗
(headers: &str, name: &str)

Source from the content-addressed store, hash-verified

1104}
1105
1106fn header_value(headers: &str, name: &str) -> Option<String> {
1107 headers.lines().find_map(|line| {
1108 let (key, value) = line.split_once(':')?;
1109 key.trim()
1110 .eq_ignore_ascii_case(name)
1111 .then(|| value.trim().to_owned())
1112 })
1113}
1114
1115fn decoded_http_body(headers: &str, body: &[u8]) -> Result<Vec<u8>, String> {
1116 if header_value(headers, "transfer-encoding").is_some_and(|value| {

Callers 2

fetch_metro_resourceFunction · 0.85
decoded_http_bodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected