I want to use Retrofit to adapt responses using another request/response protocol for IoT (not HTTP, but very similar in terms of architecture) in my Android application. Notably, I suppose the other protocol already has an executor, and Retrofit would come in just to adapt the request results in a type-safe fashion.
I saw that the Retrofit Builder
function used for passing in the client is strongly coupled to OkHttp:
public Builder client(OkHttpClient client){...}
I have started looking into Retrofit's CallAdapter
and CallAdapter.Factory
but I do not know if they can work independently from an OkHttp client or if they can bypass this client.
Is there a way to use Retrofit with another request/response protocol?