Skip to content

Commit

Permalink
Bump 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Jun 4, 2024
1 parent 8ca98cc commit cef8001
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## master

## 1.5.2 (2024-06-04)

- Add `?raw=1` option for EventSource connections to receive only data messages (no protocol messages). ([@palkan][])

## 1.5.1 (2024-04-16)
Expand Down
17 changes: 17 additions & 0 deletions docs/sse.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,20 @@ event: disconnect
data: {"type":"disconnect","reason":"remote","reconnect":false}
retry: 31536000000
```

### Raw data streaming

> @since v1.5.2
In some cases, you may not want to recieve protocol-level events (`welcome`, `confirm_subscription`) via an SSE stream (e.g., using with legacy clients). To consume only data messages, you can add an additional `?raw=1` option to the URL:

```sh
$ curl -N "http://localhost:8080/events?channel=ChatChannel&raw=1"

// no welcome or confirm_subscription or ping messages

data: {"message":"hello"}
...
```

**NOTE:** This is only applicable to GET requests.
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var (

func init() {
if version == "" {
version = "1.5.1"
version = "1.5.2"
}

if modifier != "" {
Expand Down

0 comments on commit cef8001

Please sign in to comment.