mirror of
https://github.com/chatmail/core.git
synced 2026-04-22 07:56:29 +03:00
14 lines
269 B
Rust
14 lines
269 B
Rust
//! # HTTP module.
|
|
|
|
use std::time::Duration;
|
|
|
|
use anyhow::Result;
|
|
|
|
const HTTP_TIMEOUT: Duration = Duration::from_secs(30);
|
|
|
|
pub(crate) fn get_client() -> Result<reqwest::Client> {
|
|
Ok(reqwest::ClientBuilder::new()
|
|
.timeout(HTTP_TIMEOUT)
|
|
.build()?)
|
|
}
|