Giriş GitHub Giriş Google
1.2k soru
1.3k cevap
432 yorum
3.9k üye
Kütüphane olarak http çağrısı yapabileceğimiz sanıyorum bir sürü var. Benim en beğendiğim kütüphane Jodd kütüphanesi.
https://jodd.org/http/
HttpResponse response = HttpRequest.get("http://srv:8080/api/user/get-user-by-id?userId=10194").send();
Tek satırlık bir kod ile post/get metodları çağrılabiliyor. Jodd yanı sıra Apache HttpComponents kütüphanesi var
https://hc.apache.org/httpcomponents-client-4.5.x/index.html
Örnek kod için
https://www.mkyong.com/java/apache-httpclient-examples/
Bunların hepsi bir yana java 11 ile beraber gelen http kütüphaneleri de gayet güzel görünüyor. Örnek için
https://www.mkyong.com/java/java-11-httpclient-examples/