반응형
Notice
Recent Posts
Recent Comments
Link
목록응답 (1)
NOW OR NEVER
[Android] Retrofit
Retrofit RESTful API를 쉽게 사용할 수 있도록 도와주는 라이브러리 Retrofit 객체 생성(build) 방법 val retrofit = Retrofit.Builder() .baseUrl("API URL") // JSON을 객체로 변환하기 위해 Gson 컨버터 추가 .addConverterFactory(GsonConverterFactory.create()) // Retrofit 객체 생성 .build() Annotation api 호출하는 것을 Retrofit 어노테이션을 이용하여 interface로 만들어 사용하면 더 간편하게 호출할 수 있다. @GET, @POST, @PUT, @DELETE, @PATCH HTTP 요청 메서드(GET, POST, PUT, DELETE, PATCH)를 정..
Android
2023. 7. 27. 21:42