use anyhow::{Context, Result};

/// Builds an OTLP HTTP client that never uses system or environment proxies.
pub(crate) fn build_no_proxy_http_client() -> Result<reqwest::blocking::Client> {
    reqwest::blocking::Client::builder()
        .no_proxy()
        .build()
        .context("failed to build no-proxy OTLP HTTP client")
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn no_proxy_http_client_builds() {
        build_no_proxy_http_client().unwrap();
    }
}
