1use std::time::Duration;
2
3#[derive(Debug, Clone)]
4pub struct ClientConfig {
5 pub(crate) timeout: Duration,
6 pub(crate) ssl_verify: bool,
7 pub(crate) follow_redirects: bool,
8}
9
10impl Default for ClientConfig {
11 fn default() -> Self {
12 Self {
13 timeout: Duration::from_secs(10),
14 ssl_verify: true,
15 follow_redirects: true,
16 }
17 }
18}
19
20#[cfg(test)]
21mod tests {
22 use super::*;
23
24 #[test]
25 fn test_client_config_default() {
26 let config = ClientConfig::default();
27 assert_eq!(config.timeout, Duration::from_secs(10));
28 assert!(config.ssl_verify);
29 assert!(config.follow_redirects);
30 }
31}