Welcome! Please see the About page for a little more info on how this works.

0 votes
ago in Java Interop by
retagged ago by

Clojure 1.12 was shipped with a new namespace, clojure.java.process,[1] that provided wrapper functions around the java.lang.process API, which makes it easier and nicer to work with external processes from within Clojure programs.

Java 9 introduced java.net.http.HttpClient[2] with support for HTTP/1.1, HTTP/2 as well as WebSocket along with other features. It was later standardized in Java 11[3] and has become one of the top picks for Java programs. The latest version of the HTTP client shipped with Java 26 also added support for HTTP/3.[4]

It would be great for future versions of Clojure that are based on Java 11+ to include a new namespace with wrapper functions around java.net.http.HttpClient to make it similarly easier and nicer (without all the OOP ceremonies) to work with HTTP within Clojure programs.

Examples of prior art:
- https://github.com/gnarroway/hato
- https://github.com/schmee/java-http-clj
- https://github.com/babashka/http-client
- https://central.sonatype.com/artifact/com.cognitect/http-client (upcoming?)

[1] https://clojure.org/news/2024/09/05/clojure-1-12-0
[2] https://openjdk.org/jeps/110
[3] https://openjdk.org/jeps/321
[4] https://openjdk.org/jeps/517

Please log in or register to answer this question.

...