From be05a642bff9c2484e2ef698a998769440ff8c46 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Fri, 15 Mar 2024 14:49:48 -0700 Subject: [PATCH] feat: add a builder() method to HttpsConnector It's become very idiomatic to have the builder api be accessed this way. --- src/connector.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/connector.rs b/src/connector.rs index 60e6617..dbcbabd 100644 --- a/src/connector.rs +++ b/src/connector.rs @@ -34,6 +34,13 @@ impl HttpsConnector { pub fn enforce_https(&mut self) { self.force_https = true; } + + /// Creates a [`HttpsConnectorBuilder`] to configure a `HttpsConnector`. + /// + /// This is the same as [`HttpsConnector::new()`]. + pub fn builder() -> builder::ConnectorBuilder { + builder::ConnectorBuilder::new() + } } impl Service for HttpsConnector