Skip to content

Commit cb58cd3

Browse files
committed
Expose the DefaultClient API
1 parent 61f2aa7 commit cb58cd3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,14 @@ fn retry_after(rsp: &BytesResponse) -> Option<SystemTime> {
184184
})
185185
}
186186

187+
/// A default HTTP client implementation using hyper-rustls
187188
#[cfg(feature = "hyper-rustls")]
188-
struct DefaultClient(HyperClient<hyper_rustls::HttpsConnector<HttpConnector>, Full<Bytes>>);
189+
pub struct DefaultClient(HyperClient<hyper_rustls::HttpsConnector<HttpConnector>, Full<Bytes>>);
189190

190191
#[cfg(feature = "hyper-rustls")]
191192
impl DefaultClient {
192-
fn try_new() -> Result<Self, Error> {
193+
/// Create a new default client using rustls-platform-verifier
194+
pub fn try_new() -> Result<Self, Error> {
193195
Ok(Self(
194196
HyperClient::builder(TokioExecutor::new()).build(
195197
hyper_rustls::HttpsConnectorBuilder::new()

0 commit comments

Comments
 (0)