Skip to content

Commit 0e30b7b

Browse files
authored
consul-client: Do not set http2_prior_knowledge (#381)
* consul-client: Do not set http2_prior_knowledge reqwest will use HTTP/2 unless `http1_only` is set. Setting `http2_prior_knowledge` only causes it to not even attempt other HTTP versions. * Also remove http1_only
1 parent 548536d commit 0e30b7b

File tree

1 file changed

+1
-2
lines changed
  • crates/consul-client/src

1 file changed

+1
-2
lines changed

crates/consul-client/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,9 @@ impl Client {
6565

6666
reqwest::ClientBuilder::new()
6767
.use_preconfigured_tls(tls_config)
68-
.http2_prior_knowledge()
6968
.build()
7069
} else {
71-
reqwest::ClientBuilder::new().http1_only().build()
70+
reqwest::ClientBuilder::new().build()
7271
};
7372

7473
Ok(Self {

0 commit comments

Comments
 (0)