Skip to main content

vendor_client_builder

Function vendor_client_builder 

Source
pub fn vendor_client_builder() -> ClientBuilder
Expand description

reqwest::ClientBuilder with redirect(Policy::none()), .no_proxy(), and connect_timeout(5s) baked in.

Use for clients that send to operator-trusted vendor APIs (Twitter, OpenAI, SerpAPI, etc.). No IP validation is implied — the caller asserts the host is operator-trusted. See safe_client_builder for the security rationale of the redirect / proxy / connect-timeout settings.

NOTE: the SafeDnsResolver is also installed here under IpPolicy::Strict — even vendor calls should not silently route to private IPs if a DNS hijack swings the host. Operators that need internal vendor endpoints can opt out via HEARTBIT_ALLOW_PRIVATE_IPS=1.