| 1 | This example demonstrates how to use s2n-tls with the [hyper](https://hyper.rs/) HTTP library. |
| 2 | |
| 3 | The server example demonstrates how to use s2n-tls with the [hyper-util server](https://docs.rs/hyper-util/latest/hyper_util/server/conn/auto/struct.Builder.html). The client example demonstrates how to use s2n-tls with the [hyper-util client](https://docs.rs/hyper-util/latest/hyper_util/client/legacy/struct.Builder.html), via the [s2n-tls-hyper](../../rust/standard/s2n-tls-hyper) compatibility crate. |
| 4 | |
| 5 | Start the example server as follows: |
| 6 | ``` |
| 7 | cargo run --bin server |
| 8 | ``` |
| 9 | |
| 10 | The server will listen for incoming TLS connections, and echo the contents of HTTP requests back to the client in an HTTP response. |
| 11 | |
| 12 | Connect to the server with the example client as follows: |
| 13 | ``` |
| 14 | cargo run --bin client -- --body "some text to send to the server" |
| 15 | ``` |
| 16 | |
| 17 | The example client simply sends a GET request to the server, and can be configured to use a different server address: |
| 18 | ``` |
| 19 | cargo run --bin client -- --addr www.amazon.com |
| 20 | ``` |