We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52b5c7a commit df93f70Copy full SHA for df93f70
src/connector/builder.rs
@@ -174,6 +174,19 @@ impl ConnectorBuilder<WantsProtocols1> {
174
})
175
}
176
177
+ /// Enable all HTTP versions
178
+ ///
179
+ /// For now, this enables both HTTP 1 and 2. In the future, other supported versions
180
+ /// will be enabled as well.
181
+ #[cfg(all(feature = "http1", feature = "http2"))]
182
+ pub fn enable_all_versions(mut self) -> ConnectorBuilder<WantsProtocols3> {
183
+ self.0.tls_config.alpn_protocols = vec![b"h2".to_vec()];
184
+ ConnectorBuilder(WantsProtocols3 {
185
+ inner: self.0,
186
+ enable_http1: true,
187
+ })
188
+ }
189
+
190
/// Override server name for the TLS stack
191
///
192
/// By default, for each connection hyper-rustls will extract host portion
0 commit comments