Answer the question
In order to leave comments, you need to log in
How to return a specific object from a method?
In one of the classes, a method of another class RequestInterface is called
val requestInterface = RequestInterface.getRetrofitBuild(ExampleApi::class.java)
fun getRetrofitBuild(exampleApi : ExempleApi): ExampleApi {
return Retrofit.Builder()
.baseUrl(baseDomain)
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.addConverterFactory(GsonConverterFactory.create())
.build().create(exampleApi::class)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question