diff --git a/src/client/legacy/client.rs b/src/client/legacy/client.rs index c9d00800..c5063e1b 100644 --- a/src/client/legacy/client.rs +++ b/src/client/legacy/client.rs @@ -1426,6 +1426,18 @@ impl Builder { self } + /// Sets the header table size to use for HTTP2. + /// + /// Passing `None` will do nothing. + /// + /// If not set, hyper will use a default. + #[cfg(feature = "http2")] + #[cfg_attr(docsrs, doc(cfg(feature = "http2")))] + pub fn http2_header_table_size(&mut self, size: impl Into>) -> &mut Self { + self.h2_builder.header_table_size(size); + self + } + /// Sets an interval for HTTP2 Ping frames should be sent to keep a /// connection alive. /// @@ -1500,6 +1512,18 @@ impl Builder { self } + /// Sets the `SETTINGS_MAX_CONCURRENT_STREAMS` option for HTTP2 connections. + /// + /// Passing `None` will do nothing. + /// + /// The default value is determined by the `h2` crate. + #[cfg(feature = "http2")] + #[cfg_attr(docsrs, doc(cfg(feature = "http2")))] + pub fn http2_max_concurrent_streams(&mut self, max: impl Into>) -> &mut Self { + self.h2_builder.max_concurrent_streams(max); + self + } + /// Provide a timer to be used for h2 /// /// See the documentation of [`h2::client::Builder::timer`] for more