dialtone_ccli_util 0.1.0

Dialtone Client CLI Utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use dialtone_reqwest::site_connection::SiteConnection;

pub fn get_sc(host_name: &str) -> SiteConnection {
    if host_name.eq_ignore_ascii_case("localhost") {
        SiteConnection {
            host_addr: "localhost:3000".to_string(),
            secure: false,
            auth_data: None,
            host_name: Some(host_name.to_string()),
            user_name: None,
        }
    } else {
        SiteConnection::new(host_name)
    }
}