From 38f2d2102d2b6a47c090b6bdc0208bade0f3e29a Mon Sep 17 00:00:00 2001 From: null8626 Date: Wed, 26 Apr 2023 18:18:49 +0700 Subject: [PATCH 1/2] fix: fix #6 --- src/http.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http.rs b/src/http.rs index 10c98e3..ad73c32 100644 --- a/src/http.rs +++ b/src/http.rs @@ -43,7 +43,7 @@ impl Http { let payload = format!( "\ - {predicate} /api{path} HTTP/1.0\r\n\ + {predicate} /api{path} HTTP/1.1\r\n\ Authorization: Bearer {}\r\n\ Content-Type: application/json\r\n\ Host: top.gg\r\n\ From c2296239c987dc1c2c69d71a732b5a9167e325cb Mon Sep 17 00:00:00 2001 From: null8626 Date: Wed, 26 Apr 2023 18:20:34 +0700 Subject: [PATCH 2/2] fix: fix #6 --- Cargo.toml | 4 ++-- README.md | 12 ++++++------ src/http.rs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ffa74d5..b8cb29b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "topgg" -version = "1.0.3" +version = "1.0.4" edition = "2021" authors = ["null (https://github.com/null8626)", "Top.gg (https://top.gg)"] description = "The official Rust wrapper for the Top.gg API" @@ -12,7 +12,7 @@ categories = ["api-bindings", "web-programming::http-client"] exclude = [".gitattributes", ".gitignore", "rustfmt.toml"] [dependencies] -cfg-if = "1.0" +cfg-if = "1" serde = { version = "1", default-features = false, features = ["derive"] } urlencoding = "2" diff --git a/README.md b/README.md index 94a2213..2603830 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ The official Rust SDK for the [Top.gg API](https://docs.top.gg). Make sure to have a [Top.gg](https://top.gg) API token handy, you can have an API token if you own a listed Discord bot on [Top.gg](https://top.gg) (open the edit page, see in `Webhooks` section) then add the following to your `Cargo.toml`'s dependencies: ```toml -topgg = "1.0" +topgg = "1" ``` ## Features @@ -156,7 +156,7 @@ In your `Cargo.toml`: ```toml [dependencies] -topgg = { version = "1.0", features = ["autoposter"] } +topgg = { version = "1", features = ["autoposter"] } ``` In your code: @@ -188,7 +188,7 @@ In your `Cargo.toml`: ```toml [dependencies] -topgg = { version = "1.0", default-features = false, features = ["actix"] } +topgg = { version = "1", default-features = false, features = ["actix"] } ``` In your code: @@ -224,7 +224,7 @@ In your `Cargo.toml`: ```toml [dependencies] -topgg = { version = "1.0", default-features = false, features = ["axum"] } +topgg = { version = "1", default-features = false, features = ["axum"] } ``` In your code: @@ -267,7 +267,7 @@ In your `Cargo.toml`: ```toml [dependencies] -topgg = { version = "1.0", default-features = false, features = ["rocket"] } +topgg = { version = "1", default-features = false, features = ["rocket"] } ``` In your code: @@ -303,7 +303,7 @@ In your `Cargo.toml`: ```toml [dependencies] -topgg = { version = "1.0", default-features = false, features = ["warp"] } +topgg = { version = "1", default-features = false, features = ["warp"] } ``` In your code: diff --git a/src/http.rs b/src/http.rs index ad73c32..10c98e3 100644 --- a/src/http.rs +++ b/src/http.rs @@ -43,7 +43,7 @@ impl Http { let payload = format!( "\ - {predicate} /api{path} HTTP/1.1\r\n\ + {predicate} /api{path} HTTP/1.0\r\n\ Authorization: Bearer {}\r\n\ Content-Type: application/json\r\n\ Host: top.gg\r\n\