sente
sente copied to clipboard
Electron and non-http protocol
Is there a way to use Sente with an app running on a protocol other than http(s). I'm running an Electron app and currently the library would fail with:
Test form ([:el #{"https:" "http:"}] protocol)
failed against input val "myapp:"
Is there a way around this?
@smogg Hi Oskar,
I'm not familiar with Electron or what it'd need. In principle open to changes to Sente to improve support, especially if they're small/simple. Would need you (or someone else) to propose specific change/s that'd help though.
@ptaoussanis Thanks for replying. I'm happy to dig into it when I have time. In Electron, with plugins like electron-serve
, the app will be served by a custom protocol. Skimming through the code, Sente only assumes http/https, for example here: https://github.com/ptaoussanis/sente/blob/master/src/taoensso/sente.cljc#L1385 and in a bunch of other places. Any tips on how to change that?
@smogg Haven't had an opportunity to check, but I'd suspect that a simple change to get-chsk-url
or its consumer/s may do the trick.
Closing for inactivity, as part of issue triage. Please feel free to re-open if this issue is still relevant - thanks!