You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -71,28 +66,30 @@ The `tail` example demonstrates a complete SSE client using the built-in `HyperT
71
66
72
67
**Run with HTTP:**
73
68
```bash
74
-
cargo run --example tail --features hyper -- http://sse.dev/test"Bearer token"
69
+
cargo run --example tail --features hyper -- http://live-test-scores.herokuapp.com/scores"Bearer token"
75
70
```
76
71
77
72
**Run with HTTPS:**
78
73
```bash
79
-
cargo run --example tail --features hyper,hyper-rustls -- https://sse.dev/test "Bearer token"
74
+
cargo run --example tail --features hyper-rustls-native-roots -- https://live-test-scores.herokuapp.com/scores "Bearer token"
75
+
cargo run --example tail --features hyper-rustls-webpki-roots -- https://live-test-scores.herokuapp.com/scores "Bearer token"
76
+
cargo run --example tail --features native-tls -- https://live-test-scores.herokuapp.com/scores "Bearer token"
80
77
```
81
78
82
79
The example shows:
83
80
- Creating a `HyperTransport` with custom timeouts
84
81
- Building an SSE client with authentication headers
85
82
- Configuring automatic reconnection with exponential backoff
86
83
- Handling different SSE event types (events, comments, connection status)
87
-
- Proper error handling for HTTPS URLs without the `hyper-rustls` feature
84
+
- Proper error handling for HTTPS URLs without the `hyper-rustls-native-roots` feature
88
85
89
86
See [`examples/tail.rs`](https://github.com/launchdarkly/rust-eventsource-client/tree/main/eventsource-client/examples/tail.rs) for the complete implementation.
90
87
91
88
## Features
92
89
93
90
***Built-in HTTP transport** - Production-ready `HyperTransport` powered by hyper v1
94
91
***Configurable timeouts** - Connect, read, and write timeout support
95
-
***HTTPS support** - Optional rustls integration via the `hyper-rustls` feature
92
+
***HTTPS support** - Optional rustls integration via the `hyper-rustls-*` or `native-tls` features
96
93
***Pluggable transport** - Use a custom HTTP client if needed (reqwest, etc.)
97
94
***Tokio-based streaming** - Efficient async/await support
98
95
***Custom headers** - Full control over HTTP requests
@@ -106,20 +103,16 @@ See [`examples/tail.rs`](https://github.com/launchdarkly/rust-eventsource-client
106
103
While the built-in `HyperTransport` works for most use cases, you can implement the `HttpTransport` trait to use your own HTTP client:
0 commit comments