Skip to content
EventSourceEncoder is a Elixir library to encode data into EventSource compliant data.
Elixir
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
lib
test
.gitignore
.travis.yml
LICENSE
README.md
mix.exs

README.md

Build Status

EventSourceEncoder

EventSourceEncoder is a Elixir library to encode data into EventSource compliant data.

Examples

iex> EventSourceEncoder.encode(1, "This is data")
"id: 1\\ndata: This is data\\n\\n"

iex> EventSourceEncoder.encode(1, "This is new data", :login)
"id: 1\\nevent: login\\ndata: This is new data\\n\\n"
You can’t perform that action at this time.