From 300984191329871a523d41656674a7d55b6ac2f6 Mon Sep 17 00:00:00 2001 From: Baptiste LE MORLEC Date: Fri, 24 Nov 2023 12:43:36 +0100 Subject: [PATCH] Hiding the feature behind a feature flag --- Cargo.toml | 1 + graph-http/Cargo.toml | 1 + graph-http/src/client.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 13561523..f0eca6d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,6 +48,7 @@ rustls-tls = ["reqwest/rustls-tls", "graph-http/rustls-tls", "graph-oauth/rustls brotli = ["reqwest/brotli"] deflate = ["reqwest/deflate"] trust-dns = ["reqwest/trust-dns"] +https-not-required = ["graph-http/https-not-required"] [dev-dependencies] bytes = { version = "1.4.0" } diff --git a/graph-http/Cargo.toml b/graph-http/Cargo.toml index b66efdce..50827d4e 100644 --- a/graph-http/Cargo.toml +++ b/graph-http/Cargo.toml @@ -33,3 +33,4 @@ graph-core = { path = "../graph-core" } default = ["native-tls"] native-tls = ["reqwest/native-tls"] rustls-tls = ["reqwest/rustls-tls"] +https-not-required = [] diff --git a/graph-http/src/client.rs b/graph-http/src/client.rs index 47f05ba4..8b7c4e9b 100644 --- a/graph-http/src/client.rs +++ b/graph-http/src/client.rs @@ -133,6 +133,7 @@ impl GraphClientConfiguration { self } + #[cfg(feature = "https-not-required")] pub fn https_only(mut self, https_only: bool) -> GraphClientConfiguration { self.config.https_only = https_only; self