The only clean way is to use a port.

The unclean but practical way to do this is to use Native (this is what you
have in the git repository you linked)

To my knowledge, there is no built-in way of doing this in pure Elm and
from how I understand the development of Elm, there are little chances for
this to be on any roadmap.
The functionality overlaps that of websockets (which is already available
in Elm)  and one would have to come up with a very convincing argument
(use-case) to justify spending resources in the design and implementation
of Elm's EventSource API (Elm takes API design very seriously).






On Wed, Sep 14, 2016 at 1:16 PM, Erwan Queffélec <[email protected]> wrote:

> Hi,
>
> I'm trying to find the cleanest possible way of subscribing and receiving
> server side events (SSE) (http://www.html5rocks.com/en/
> tutorials/eventsource/basics/)
>
> So far I found this https://stackoverflow.com/questions/35144530/how-to-
> capture-server-events-in-elm
>
> And this (code contributed by the SO answer author): https://github.com/
> lukewestby/elm-http-event-source
>
> Is there any built-in way of doing this with elm yet ? Is that somewhere
> on the roadmap ?
>
> Regards,
>
> Erwan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
There is NO FATE, we are the creators.
blog: http://damoc.ro/

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to