sente icon indicating copy to clipboard operation
sente copied to clipboard

Electron and non-http protocol

Open smogg opened this issue 6 years ago • 3 comments

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 avatar Apr 17 '18 13:04 smogg

@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 avatar Apr 17 '18 17:04 ptaoussanis

@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 avatar Apr 18 '18 07:04 smogg

@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.

ptaoussanis avatar Apr 19 '18 07:04 ptaoussanis

Closing for inactivity, as part of issue triage. Please feel free to re-open if this issue is still relevant - thanks!

ptaoussanis avatar Feb 23 '23 15:02 ptaoussanis