Skip to content

Retrofit CallAdapter, Gson Converter 커스텀 #37

@heechokim

Description

@heechokim

배경

  • #33 네트워크 베이스 코드 작성 PR 리뷰를 받던 중, 성규님께서 Retrofit CallAdapter와 Gson Converter를 조금 더 커스터마이징 할 수 있음을 알려주셨습니다.
  • 리뷰 내용을 바탕으로 추가 작업을 하고자 합니다.

image

내용

Before

interface ApiService {
    @GET("success")
    suspend fun getSuccess(): ApiResult<Success<Any>>
    @GET("failure")
    suspend fun getFailure(): ApiResult<Success<Any>>
}

After

interface ApiService {
    @GET("success")
    suspend fun getSuccess(): ApiResult<User>
    @GET("failure")
    suspend fun getFailure(): ApiResult<Room>
}

위 형태로 변경하는 것이 목표입니다.

참고 자료

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions