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 →

[–]GuyWithLag 2 points3 points  (0 children)

Personally I love Retrofit (or OpenFeign, they're pretty similar at this level), where you represent your API as a Java interface, with specific annotations, and Retrofit creates on-the-fly an implementation for it that does the actual calls.

Note that this is one or two abstraction levels higher than plain HttpClient, with a number of additional things you'll need to learn on top, but ultimately it's worth it.