Skip to content

Commit 4ddba28

Browse files
author
LaunchDarklyReleaseBot
committed
Releasing version 0.9.0
1 parent bfd9ed3 commit 4ddba28

File tree

3 files changed

+55
-2
lines changed

3 files changed

+55
-2
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
All notable changes to the project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
44

5+
## [0.9.0] - 2022-03-15
6+
### Added:
7+
- Added support for SSE test harness.
8+
9+
### Changed:
10+
- Change `ClientBuilder` to return `impl Client`, where `Client` is a sealed trait that exposes a `stream()` method.
11+
12+
### Fixed:
13+
- Fixed various bugs related to SSE protocol.
14+
515
## [0.8.2] - 2022-02-03
616
### Added:
717
- Support for creating an event source client with a pre-configured connection.

README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# eventsource-client
2+
3+
Client for the [Server-Sent Events] protocol (aka [EventSource]).
4+
5+
[Server-Sent Events]: https://html.spec.whatwg.org/multipage/server-sent-events.html
6+
[EventSource]: https://developer.mozilla.org/en-US/docs/Web/API/EventSource
7+
8+
## Requirements
9+
10+
Requires tokio.
11+
12+
## Usage
13+
14+
Example that just prints the type of each event received:
15+
16+
```rust
17+
use eventsource_client as es;
18+
19+
let mut client = es::ClientBuilder::for_url("https://example.com/stream")?
20+
.header("Authorization", "Basic username:password")?
21+
.build();
22+
23+
client
24+
.stream()
25+
.map_ok(|event| println!("got event: {:?}", event))
26+
.map_err(|err| eprintln!("error streaming events: {:?}", err));
27+
```
28+
29+
(Some boilerplate omitted for clarity; see [examples directory] for complete,
30+
working code.)
31+
32+
[examples directory]: https://github.com/launchdarkly/rust-eventsource-client/tree/master/eventsource-client/examples
33+
## Features
34+
35+
* tokio-based streaming client.
36+
* Supports setting custom headers on the HTTP request (e.g. for endpoints
37+
requiring authorization).
38+
* Retry for failed connections.
39+
* Reconnection if connection is interrupted, with exponential backoff.
40+
41+
## Stability
42+
43+
Early stage release for feedback purposes. May contain bugs or performance
44+
issues. API subject to change.

eventsource-client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "eventsource-client"
3-
version = "0.8.2"
3+
version = "0.9.0"
44
description = "Client for the Server-Sent Events protocol (aka EventSource)"
55
repository = "https://github.com/launchdarkly/rust-eventsource-client"
66
authors = ["LaunchDarkly"]

0 commit comments

Comments
 (0)