Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Klubuntu authored Nov 28, 2023
1 parent 4f2c887 commit 0ff7b06
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Run the following Cargo command in your project directory:

Or add the following line to your Cargo.toml:

`easycookie = "1.0.1"`
`easycookie = "1.0.2"`

### How to use ?
```rust
Expand All @@ -26,16 +26,27 @@ let headers = example_request.headers();
### Examples
```rust
// Method 1
let cookie_value = easycookie::get_cookie(headers.clone(), "random").await;
let cookie_value = easycookie::get_cookie(headers.clone(), "cookie_name").await;
println!("Cookie Value is: {:?}", cookie_value.get_value());
```
```rust
// Method 2
let setup_header = easycookie::set_header(headers.clone()).await;
let get_new_cookie = setup_header.get_cookie("random2").await;
let get_new_cookie = setup_header.get_cookie("cookie_name").await;
println!("Cookie Value is: {:?}", get_new_cookie.get_value());
```

### Other Features
```rust
// Get cookie by number position, first from 0;
let cookie_from_nr = setup_header.get_cookie_num(0).await;
println!("Cookie Value from nr is: {:?}", cookie_from_nr.get_value());

// Get List - all cookie names from site;
let cookie_list = setup_header.list_cookies();
println!("{:?}", cookie_list);
```

:star: Thank you for usage

Pull Requests are welcome

0 comments on commit 0ff7b06

Please sign in to comment.