Fork me on GitHub
#yada
<
2020-03-19
>
rlhk14:03:31

Hi yada noob here, I’m trying to integrate sente with yada, Is there an example or guide defining sente’s required “chsk” route? Something like the following always gives 406:

...
["chsk"
 (resource
   {:methods
    {:get {:response #'ring-ajax-get-or-ws-handshake}
     :post {:response #'ring-ajax-post}}})]

Braden Shepherdson15:03:44

yada has native support for server-sent events, if that's what you're using sente for.

Braden Shepherdson15:03:30

if you already depend on sente otherwise, though, then I'm not sure. probably best to look at integrating generic Ring handlers in yada, since sente publishes Ring handlers.

rlhk15:03:18

Thanks. I’m aware of yada server-sent events. Looking at Sente for it’s full stack unified API.

Braden Shepherdson15:03:39

(I'm new to yada myself. the only part I know well is the auth system, since the new stuff is poorly documented and I dug into the code to grok it.)

rlhk15:03:33

Yeah that’s too bad. I actually evaluated Yada 2 years ago. Looks like the doc stayed the same. Back then the edge examples are straight forward to run. But now not so obvious …

Braden Shepherdson16:03:59

there have been some updates to the documentation, but they haven't been re-published on the main yada or edge doc sites.

Braden Shepherdson16:03:04

which is almost worse.