scittle

Benjamin 2022-11-14T13:32:44.630789Z

Hi how does scittle.cljs-ajax work and how do I say method delete with it? I can successfully post and get

borkdude 2022-11-14T13:34:41.884799Z

@benjamin.schwerdtner Have you read this? https://github.com/JulianBirch/cljs-ajax#ajax-request

borkdude 2022-11-14T13:35:25.681269Z

imo cljs-ajax isn' really necessary with scittle, now that fetch is a thing: https://stackoverflow.com/a/40284425/6264 you might just use that

borkdude 2022-11-14T13:35:52.919529Z

I wasn't familiar with fetch before I included cljs-ajax and I'm considering dropping it, unless users convince me to keep it

borkdude 2022-11-14T13:37:39.608319Z

ah I see that cljs-ajax config in scittle is pretty minimal and doesn't even include the ajax-request fn https://github.com/babashka/scittle/blob/77561555769686236df608f55e0d0cc6936dcc04/src/scittle/cljs_ajax.cljs#L9-L10

borkdude 2022-11-14T13:40:00.870299Z

I've made an issue here now: https://github.com/babashka/scittle/issues/23

ray 2022-11-14T14:03:29.810919Z

@borkdude can we use the nREPL from nbb?

Benjamin 2022-11-14T14:06:10.486489Z

@borkdude ah damn I was copying from the guestbook example. If I use fetch I think I also have to check how transit+json works but you are right to use fetch

borkdude 2022-11-14T14:41:12.650459Z

@benjamin.schwerdtner Hmm, transit+json might be a good reason to actually keep cljs-ajax, or we should include transit explicitly

☺️ 1
ray 2022-11-14T15:05:02.021199Z

I see this: > In babashka or Clojure JVM, use the https://github.com/babashka/sci.nrepl dependency and run:

ray 2022-11-14T15:05:23.571169Z

is that dependency also available via nbb.edn?

borkdude 2022-11-14T15:05:46.595819Z

no, it's a JVM dep

ray 2022-11-14T15:06:19.357079Z

so how can we work with it in nbb?

borkdude 2022-11-14T15:06:36.792809Z

The reason for this is that browser's can't open TCP sockets so there is a bb or JVM process running in between. nbb has nothing to do with scittle

ray 2022-11-14T15:09:32.005619Z

facepalm - ok

Benjamin 2022-11-14T16:02:17.604149Z

I'm totally using scittle in "prod" (tool) and it's a charm

🎉 3
borkdude 2022-11-14T17:57:32.024769Z

Nice :)

1