Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider requiring Java9 minimum (ideally 11) #118

Closed
jimpil opened this issue Aug 3, 2023 · 2 comments
Closed

Consider requiring Java9 minimum (ideally 11) #118

jimpil opened this issue Aug 3, 2023 · 2 comments

Comments

@jimpil
Copy link
Contributor

jimpil commented Aug 3, 2023

This would open the door to migrating away from clj-http, and instead rely on the native HttpClient (e.g. via hato which is a great little library).

Moreover, even if you don't like the sounds of that, the current http namespace could really use some love.

First of all, I am kind of confused by the use of many dynamic vars (are these intended to be re-bound often?), and a bunch of alter-var-root calls under connect!. I am probably missing something, but I 'm having trouble understanding the motivation behind this kind of pattern. From what I saw in various examples/tests etc, usages of connect! could easily be served by an atom instead. Anyway, it's just something that caught my eye...

Secondly, the way clj-http is used, it creates a brand new HttpClient for every single outbound request (some functions do two requests, so that would be 2 HttpClient objects). This is kind of wasteful, and if fact the clj-http docs do draw attention to that.

Anyway, I'm just probing here...let me know of your thoughts 👍

@michaelklishin
Copy link
Owner

I am all for requiring Java 11. Please submit a PR. We will likely bump the version to 6.0 after merging it, and should ship 5.5.0 before doing so.

@michaelklishin
Copy link
Owner

Addressed in #119.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants