Compare commits

...

1 commit

Author SHA1 Message Date
9743b3f9dc
feat: add http3 support
All checks were successful
CI / Test (push) Successful in 4m40s
2024-03-16 19:59:58 +01:00
2 changed files with 9 additions and 1 deletions

View file

@ -15,7 +15,7 @@ include = ["/src", "README.md", "LICENSE", "!snapshots"]
members = [".", "codegen", "downloader", "cli"] members = [".", "codegen", "downloader", "cli"]
[features] [features]
default = ["default-tls"] default = ["rustls-tls-native-roots"]
rss = ["quick-xml"] rss = ["quick-xml"]
@ -27,6 +27,9 @@ native-tls-vendored = ["reqwest/native-tls-vendored"]
rustls-tls-webpki-roots = ["reqwest/rustls-tls-webpki-roots"] rustls-tls-webpki-roots = ["reqwest/rustls-tls-webpki-roots"]
rustls-tls-native-roots = ["reqwest/rustls-tls-native-roots"] rustls-tls-native-roots = ["reqwest/rustls-tls-native-roots"]
# Requires RUSTFLAGS='--cfg reqwest_unstable'
http3 = ["reqwest/http3"]
[dependencies] [dependencies]
quick-js-dtp = { version = "0.4.1", default-features = false, features = [ quick-js-dtp = { version = "0.4.1", default-features = false, features = [
"patch-dateparser", "patch-dateparser",

View file

@ -466,6 +466,11 @@ impl RustyPipeBuilder {
.brotli(true) .brotli(true)
.redirect(reqwest::redirect::Policy::none()); .redirect(reqwest::redirect::Policy::none());
#[cfg(feature = "http3")]
{
client_builder = client_builder.http3_prior_knowledge();
}
if let Some(timeout) = self.timeout.or_default(|| Duration::from_secs(20)) { if let Some(timeout) = self.timeout.or_default(|| Duration::from_secs(20)) {
client_builder = client_builder.timeout(timeout); client_builder = client_builder.timeout(timeout);
} }