Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonathanstowe/eventsource-client
A client for server sent events in Raku
https://github.com/jonathanstowe/eventsource-client
async client eventsource raku server-sent-events
Last synced: 19 days ago
JSON representation
A client for server sent events in Raku
- Host: GitHub
- URL: https://github.com/jonathanstowe/eventsource-client
- Owner: jonathanstowe
- License: artistic-2.0
- Created: 2017-12-30T12:16:12.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-08-08T16:36:18.000Z (over 2 years ago)
- Last Synced: 2024-07-30T20:11:36.943Z (4 months ago)
- Topics: async, client, eventsource, raku, server-sent-events
- Language: Raku
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# EventSource::Client
A Raku client for [Server-Sent Events](https://www.w3.org/TR/eventsource/)
![Build Status](https://github.com/jonathanstowe/EventSource-Client/workflows/CI/badge.svg)
## Synopsis
```raku
use EventSource::Client;react {
whenever EventSource::Client.new(source => "http://127.0.0.1:7798/") -> $event {
say "> " ~ $event.data;
}
}
```## Description
[Server-Sent Events](https://www.w3.org/TR/eventsource/) provide a mechanism for
timely delivery of server to client events over HTTP and can in some use-cases
be more convenient than a similar pattern implemented using Web Sockets and is
easier on the network than, for instance, HTTP polling by the client.This library allows you to consume server sent events in a Raku program in
a reasonably idiomatic and reactive fashion.## Installation
Assuming you have a working Rakudo installation then you should be able to
install this with `zef` :zef install EventSource::Client
# Or from a local clone
zef install .
## Support
Please post any bugs, feature requests or patches at [github](https://github.com/jonathanstowe/EventSource-Client/issues)
## Copyright & Licence
This is free software, please see the [LICENCE](LICENCE) for details.
© Jonathan Stowe 2020-2021