interface IHttpClient {
suspend fun post(
body: Any, urlEndPoint: String
): Response
suspend fun get(urlEndPoint: String): Response
}
which will implemented by volley or retrofit with help of DI, but currently here my response object is of type(retrofit2.Response) , but i want make this generic so that it will support any HTTP Client (volley etc…)
It would then make more sense to just return the C directly instead of trying something like RESPONSE<C>. The only other way is to wrap responses in your own type, like: interface Response<T>. It depends on what you would like to do.