()
| 29 | } |
| 30 | |
| 31 | pub fn new_client() -> Result<Client, RequestError> { |
| 32 | Ok(Client::builder() |
| 33 | .use_preconfigured_tls(client_config()) |
| 34 | .user_agent(USER_AGENT.chars().filter(|c| c.is_ascii_graphic()).collect::<String>()) |
| 35 | .cookie_store(true) |
| 36 | .build()?) |
| 37 | } |
| 38 | |
| 39 | pub fn create_default_root_cert_store() -> RootCertStore { |
| 40 | let mut root_cert_store: RootCertStore = webpki_roots::TLS_SERVER_ROOTS.iter().cloned().collect(); |
no test coverage detected