diff --git a/Cargo.lock b/Cargo.lock index 248ab62..ef296cf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,7 +104,7 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "http-request" -version = "5.0.0" +version = "5.1.0" dependencies = [ "color-output", "hex", diff --git a/Cargo.toml b/Cargo.toml index 72613fa..dc2b2fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "http-request" -version = "5.0.0" +version = "5.1.0" edition = "2021" authors = ["ltpp-universe "] license = "MIT" diff --git a/readme.md b/readme.md index 384cb47..39a1078 100644 --- a/readme.md +++ b/readme.md @@ -37,8 +37,8 @@ cargo add http-request ```rs use http_request::*; use std::collections::HashMap; -let mut header: HashMap = HashMap::new(); -header.insert("header-key"., "header-value".); +let mut header: HashMap<&str, &str> = HashMap::new(); +header.insert("header-key", "header-value"); let mut _request_builder = HttpRequestBuilder::new() .get("https://ltpp.vip/") .headers(header) @@ -64,10 +64,10 @@ _request_builder ```rs use http_request::*; use std::collections::HashMap; -let mut header: HashMap = HashMap::new(); -header.insert("header-key"., "header-value".); -let mut body: HashMap = HashMap::new(); -body.insert("body-key"., "body-value".); +let mut header: HashMap<&str, &str> = HashMap::new(); +header.insert("header-key", "header-value"); +let mut body: HashMap<&str, &str> = HashMap::new(); +body.insert("body-key", "body-value"); let mut _request_builder = HttpRequestBuilder::new() .post("http://localhost:80") .json(body) @@ -92,8 +92,8 @@ _request_builder ```rs use http_request::*; use std::collections::HashMap; -let mut header: HashMap = HashMap::new(); -header.insert("header-key"., "header-value".); +let mut header: HashMap<&str, &str> = HashMap::new(); +header.insert("header-key", "header-value"); let mut _request_builder = HttpRequestBuilder::new() .post("http://localhost") .text("hello")