Java로 RESTful API 구현하기: Retrofit2, OkHttp3, Gson 활용 1. Retrofit2를 활용한 API 호출 예제 및 중요 사항Retrofit2는 Square에서 개발한 HTTP 클라이언트 라이브러리로, RESTful API 호출을 매우 간단하게 만들어줍니다.예제 코드public interface ApiService { @GET("/users/{id}") Call getUser(@Path("id") int userId);}Retrofit retrofit = new Retrofit.Builder() .baseUrl("https://api.example.com/") .addConverterFactory(GsonConverterFactory.create()) ..