Skip to content

Commit

Permalink
feat:readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ltpp-universe committed Dec 1, 2024
1 parent 43b6532 commit 10f2904
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "http-request"
version = "5.0.0"
version = "5.1.0"
edition = "2021"
authors = ["ltpp-universe <[email protected]>"]
license = "MIT"
Expand Down
16 changes: 8 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ cargo add http-request
```rs
use http_request::*;
use std::collections::HashMap;
let mut header: HashMap<String, String> = 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)
Expand All @@ -64,10 +64,10 @@ _request_builder
```rs
use http_request::*;
use std::collections::HashMap;
let mut header: HashMap<String, String> = HashMap::new();
header.insert("header-key"., "header-value".);
let mut body: HashMap<String, String> = 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)
Expand All @@ -92,8 +92,8 @@ _request_builder
```rs
use http_request::*;
use std::collections::HashMap;
let mut header: HashMap<String, String> = 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")
Expand Down

0 comments on commit 10f2904

Please sign in to comment.