Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MovieHunt blog part2. okhttp
val builder = OkHttpClient.Builder()
builder.protocols(listOf(Protocol.HTTP_1_1, Protocol.HTTP_2))
// TODO: set timeout, cache...etc.
val httpClient = builder.build()
Retrofit.Builder()
…(略)
.client(httpClient) // 加到 Retrofit
.build()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.