Differences From
Artifact [28d6c08201]:
| ︙ | | |
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
-
+
+
|
http_client: reqwest::Client,
}
impl Core {
pub async fn new(settings: config::Config) -> Result<Core> {
let owner_chat = ChatPeerId::from(settings.get_int("owner").stack()?);
let api_key = settings.get_string("api_key").stack()?;
let tg = Client::new(&api_key).stack()?;
let tg = Client::new(&api_key).stack()?
.with_host(settings.get_string("api_gateway").stack()?);
let mut client = reqwest::Client::builder();
if let Ok(proxy) = settings.get_string("proxy") {
let proxy = reqwest::Proxy::all(proxy).stack()?;
client = client.proxy(proxy);
}
let http_client = client.build().stack()?;
|
| ︙ | | |