diff --git a/src/lib.rs b/src/lib.rs index bd148382..6c6c2c1b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -149,7 +149,10 @@ where session: Mutex>, } -impl Client { +/// Non-secured variant of the client (using plain HTTP requests) +pub type HttpClient = Client; + +impl HttpClient { /// Creates a new client for making HTTP requests to the given homeserver. pub fn new(homeserver_url: Url, session: Option) -> Self { Self(Arc::new(ClientData { @@ -171,8 +174,12 @@ impl Client { } } +/// Secured variant of the client (using HTTPS requests) #[cfg(feature = "tls")] -impl Client> { +pub type HttpsClient = Client>; + +#[cfg(feature = "tls")] +impl HttpsClient { /// Creates a new client for making HTTPS requests to the given homeserver. pub fn https(homeserver_url: Url, session: Option) -> Result { let connector = HttpsConnector::new(4)?;