Fork me on GitHub
#babashka
<
2020-08-31
>
borkdude12:08:46

I haven't really considered it so far, but http-kit also has an http client which is modelled after clj-http, but probably much lighter on GraalVM, so it becomes a contender in this space. So far clj-http-lite was the only light-weight GraalVM-compatible http client library. Clj-http recently became compatible, but still results into bloated binaries. Is anyone familiar with this client?

seancorfield17:08:31

@borkdude We use http-kit's client at work in several places. Works great.

seancorfield17:08:03

We started using it instead of clj-http in some places because we wanted to be able to interrupt an HTTP request if it is taking too long. I like that it is async by default.

kari17:08:09

Babashka is great! I just used it in one personal exercise.

borkdude17:08:35

Hmm, http-kit also has HTTP connection reuse, which clj-http-lite hasn't. It also supports a patch request. Doesn't seem like a bad thing to include - although we already have babashka.curl, creating a new process for every request might not be optimal for all use cases.

lukasz18:08:14

I'd definitely like to have a built-in http client (server too?) in babashka, rather than rely on babashka.curl

lukasz18:08:32

at the cost of binary size

borkdude18:08:46

Note that we can already run clj-http-lite as library, but having a client built-in is more convenient. I tested the server too, it was only +0.5MB which seems great. Made an issue here about the server: https://github.com/borkdude/babashka/issues/556 Feel free to respond there.

lukasz18:08:05

Awesome, thanks!

lukasz18:08:22

(that promised write up about BB + ECS is coming, I swear 🤞 )

bananadance 1