|
1 | 1 | # Examples of using hyper
|
2 | 2 |
|
3 |
| -These examples show of how to do common tasks using `hyper`. You may also find the [Guides](https://hyper.rs/guides) helpful. |
| 3 | +These examples show how to do common tasks using `hyper`. You may also find the [Guides](https://hyper.rs/guides/1/) helpful. |
4 | 4 |
|
5 |
| -If you checkout this repository, you can run any of the examples `cargo run --example example_name`. |
| 5 | +If you checkout this repository, you can run any of the examples with the command: |
| 6 | + |
| 7 | + `cargo run --example {example_name} --features="full"` |
6 | 8 |
|
7 | 9 | ### Dependencies
|
8 | 10 |
|
9 |
| -Most of these examples use these dependencies: |
| 11 | +A complete list of dependencies used across these examples: |
10 | 12 |
|
11 | 13 | ```toml
|
12 | 14 | [dependencies]
|
13 |
| -hyper = { version = "0.14", features = ["full"] } |
| 15 | +hyper = { version = "1.0.0-rc.3", features = ["full"] } |
14 | 16 | tokio = { version = "1", features = ["full"] }
|
15 | 17 | pretty_env_logger = "0.4"
|
| 18 | +http-body-util = "0.1.0-rc.2" |
| 19 | +bytes = "1" |
| 20 | +serde = { version = "1.0", features = ["derive"] } |
| 21 | +serde_json = "1.0" |
| 22 | +url = "2.2" |
| 23 | +http = "0.2" |
| 24 | +futures-util = { version = "0.3", default-features = false, features = ["alloc"] } |
16 | 25 | ```
|
17 | 26 |
|
18 | 27 | ## Getting Started
|
19 | 28 |
|
20 | 29 | ### Clients
|
21 | 30 |
|
22 |
| -* [`client`](client.rs) - A simple CLI http client that request the url passed in parameters and outputs the response content and details to the stdout, reading content chunk-by-chunk. |
| 31 | +* [`client`](client.rs) - A simple CLI http client that requests the url passed in parameters and outputs the response content and details to the stdout, reading content chunk-by-chunk. |
23 | 32 |
|
24 | 33 | * [`client_json`](client_json.rs) - A simple program that GETs some json, reads the body asynchronously, parses it with serde and outputs the result.
|
25 | 34 |
|
|
0 commit comments