HttpClientModule

@Module
object HttpClientModule

Dagger Module with Retrofit

Author

Vitaliy Zarubin

Functions

provideOkHttpClient
Link copied to clipboard
@Provides
fun provideOkHttpClient(): OkHttpClient

Factory for calls, which can be used to send HTTP requests and read their responses.

provideRetrofit
Link copied to clipboard
@Provides
fun provideRetrofit(okHttpClient: OkHttpClient): Retrofit

Retrofit adapts a Java interface to HTTP calls by using annotations on the declared methods to define how requests are made.

Properties

json
Link copied to clipboard
private val json: Json

Builder of the Json instance provided by Json { ... } factory function.