Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(examples): update dependencies (#3099) #3226

Merged
merged 2 commits into from
May 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
# Examples of using hyper

These examples show of how to do common tasks using `hyper`. You may also find the [Guides](https://hyper.rs/guides) helpful.
These examples show how to do common tasks using `hyper`. You may also find the [Guides](https://hyper.rs/guides/1/) helpful.

If you checkout this repository, you can run any of the examples `cargo run --example example_name`.
If you checkout this repository, you can run any of the examples with the command:

`cargo run --example {example_name} --features="full"`

### Dependencies

Most of these examples use these dependencies:
A complete list of dependencies used across these examples:

```toml
[dependencies]
hyper = { version = "0.14", features = ["full"] }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
tokio = { version = "1", features = ["full"] }
pretty_env_logger = "0.4"
http-body-util = "0.1.0-rc.2"
bytes = "1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
url = "2.2"
http = "0.2"
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
```

## Getting Started

### Clients

* [`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.
* [`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.

* [`client_json`](client_json.rs) - A simple program that GETs some json, reads the body asynchronously, parses it with serde and outputs the result.

Expand Down