Fork me on GitHub
Nate Sutton07:01:02

getting an issue using clj-http-lite with babashka

Nate Sutton07:01:19

$ bb file.clj
clojure.lang.ExceptionInfo: Method close on class . not allowed! [at /path/to/file.clj, line 228, column 19]

Nate Sutton07:01:55

which happens within the clj-http.lite.core/request here:

(when body
      (with-open [out (.getOutputStream conn)]
        (io/copy body out)))

Nate Sutton07:01:22

which is from an uberscript where I'm making an http call against hasura:

(client/post ""
             {:body (json/generate-string {:type "get_inconsistent_metadata",
                                           :args {}})
              :headers {"X-Hasura-Role" "admin"}
              :content-type :json
              :accept :json})


nice extra comment too :)


btw @nate_clojurians have you tried with the newly released version?

Nate Sutton22:01:00

I'm writing something right now to try it out

Nate Sutton22:01:11

well, a builder for uberscripts for work

Nate Sutton23:01:44

gah, ok, I still haven't tested it yet

Nate Sutton23:01:53

I'm trying to build an uberscript without executing the script

Nate Sutton23:01:56

and having a hard time

Nate Sutton23:01:46

I suppose it has to execute to generate the uberscript?