RequestAdapterFactory

class RequestAdapterFactory : CallAdapter.Factory

Request adapter factory.

When you use Request as the return value of the network api.You should add RequestAdapterFactory to the Retrofit by Retrofit.Builder.addCallAdapterFactory.

// The is a example.
val retrofit = Retrofit.Builder()
.... // Other configuration.
.addCallAdapterFactory(RequestAdapterFactory())
.build()

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open operator override fun get(returnType: Type, annotations: Array<Annotation>, retrofit: Retrofit): CallAdapter<*, *>?