MCPcopy Create free account
hub / github.com/PerroEngine/Perro / response_headers

Function response_headers

perro_source/api_modules/perro_networking/src/http.rs:639–650  ·  view source on GitHub ↗
(response: &ureq::http::Response<ureq::Body>)

Source from the content-addressed store, hash-verified

637 }
638 }
639 Err(err) => HttpEvent::Failed(err),
640 }
641}
642
643fn build_agent(config: &HttpConfig) -> Result<ureq::Agent, ureq::Error> {
644 let mut builder = ureq::Agent::config_builder()
645 .timeout_global(Some(Duration::from_millis(config.timeout_ms)))
646 .tls_config(tls_config(&config.tls_mode));
647
648 if let Some(proxy) = &config.proxy {
649 builder = builder.proxy(Some(ureq::Proxy::new(&proxy.url)?));
650 }
651
652 Ok(builder.build().new_agent())
653}

Callers 1

send_requestFunction · 0.85

Calls 4

headersMethod · 0.80
okMethod · 0.80
iterMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected