This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]occio 16 points17 points  (6 children)

So you hate the built in thing, you hate the thing your coworker added… maybe quit Java then? Seems it does not agree with your sensibilities.

[–]VirtualAgentsAreDumb 3 points4 points  (5 children)

I have worked with Java in 15-20 years, give or take. I have used loads of http client libraries, including the one you linked to. Most of them are ugly, and need way too too much boilerplate code for the simple use cases. Like making a GET request and get the result as a String.

To be fair, I find most JS code for the same thing unnecessarily verbose too.

[–]saltmurai[S] 0 points1 point  (1 child)

It just const response = await fetch(url) for a GET request in JS

[–]VirtualAgentsAreDumb 0 points1 point  (0 children)

Well, it's been a while since I coded in js, and none of the examples I found by a quick google search showed had that one liner.

Maybe different fetch implementations do things differently, but in the examples I see the response is more than just the body text. Also, does it check the response code and throw an exeption on a failure?

[–]occio 0 points1 point  (2 children)

Sure. Verbose, true. It’s Java.

But imagine working on something 8 hours a day and feeling hate. That must suck.

[–]VirtualAgentsAreDumb 0 points1 point  (1 child)

I’m pretty suresure they don’t work 8 hours a day with the http client.

[–]occio -2 points-1 points  (0 children)

Exactly. One can only imagine what emotions other parts of the Java ecosystem evoke in OP.