From da4883db29b70f60839b2a53e90a97bcd98bf6c1 Mon Sep 17 00:00:00 2001 From: spikecodes <19519553+spikecodes@users.noreply.github.com> Date: Sun, 21 Mar 2021 11:37:03 -0700 Subject: [PATCH] Upgrade client to HTTP/2 --- Cargo.toml | 2 +- src/client.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 9b55621..d6194bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "libreddit" description = " Alternative private front-end to Reddit" license = "AGPL-3.0" repository = "https://github.com/spikecodes/libreddit" -version = "0.6.0" +version = "0.6.1" authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"] edition = "2018" diff --git a/src/client.rs b/src/client.rs index eaf9092..64ab1a6 100644 --- a/src/client.rs +++ b/src/client.rs @@ -56,6 +56,7 @@ fn request(url: String) -> Boxed, String>> { let builder = Request::builder() .method("GET") .uri(&url) + .version(hyper::Version::HTTP_2) .header("User-Agent", format!("web:libreddit:{}", env!("CARGO_PKG_VERSION"))) .header("Host", "www.reddit.com") .header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8")