fn headers(feature: Option<&str>) -> HeaderMap {
    let version = if install::target::DEBUG {
        "dev"
    } else {
        env!("CARGO_PKG_VERSION")
    };
    let user_agent = if let Some(feature) = feature {
        format!("wrangler/{}/{}", version, feature)
    } else {
        format!("wrangler/{}", version)
    };

    let mut headers = HeaderMap::new();
    headers.insert(USER_AGENT, HeaderValue::from_str(&user_agent).unwrap());
    headers
}
////---------------------------OLD API CLIENT CODE---------------------------////
// TODO: remove this and replace it entirely with cloudflare-rs
OLD API CLIENT CODE
TODO: remove this and replace it entirely with cloudflare-rs
OLD API CLIENT CODE TODO : remove this and replace it entirely with cloudflare - rs
fn headers(feature: Option<&str>) -> HeaderMap {
    let version = if install::target::DEBUG {
        "dev"
    } else {
        env!("CARGO_PKG_VERSION")
    };
    let user_agent = if let Some(feature) = feature {
        format!("wrangler/{}/{}", version, feature)
    } else {
        format!("wrangler/{}", version)
    };
    let mut headers = HeaderMap::new();
    headers.insert(USER_AGENT, HeaderValue::from_str(&user_agent).unwrap());
    headers
}
fn headers ( feature : Option < & str > ) -> HeaderMap { let version = if install :: target :: DEBUG { " " } else { env ! ( " " ) } ; let user_agent = if let Some ( feature ) = feature { format ! ( " " version feature ) } else { format ! ( " " version ) } ; let mut headers = HeaderMap :: new ( ) ; headers . insert ( USER_AGENT , HeaderValue :: from_str ( & user_agent ) . unwrap ( ) ) ; headers }
OLD API CLIENT CODE
TODO: remove this and replace it entirely with cloudflare-rs
OLD API CLIENT CODE TODO : remove this and replace it entirely with cloudflare - rs
feature
Option<&str>