mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
JSON-RPC: add get_http_blob API
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
///! # Common network utilities.
|
||||
//! # Common network utilities.
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
use std::pin::Pin;
|
||||
use std::str::FromStr;
|
||||
@@ -12,9 +12,12 @@ use tokio_io_timeout::TimeoutStream;
|
||||
use crate::context::Context;
|
||||
use crate::tools::time;
|
||||
|
||||
pub(crate) mod http;
|
||||
pub(crate) mod session;
|
||||
pub(crate) mod tls;
|
||||
|
||||
pub use http::{read_url, read_url_blob};
|
||||
|
||||
async fn connect_tcp_inner(addr: SocketAddr, timeout_val: Duration) -> Result<TcpStream> {
|
||||
let tcp_stream = timeout(timeout_val, TcpStream::connect(addr))
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user