retrofit-java
Installation
SKILL.md
Retrofit + OkHttp (Java)
Instructions
Retrofit defines HTTP services as Java interfaces; OkHttp is the client under it. One OkHttpClient per app, one Retrofit per base URL, services are stateless singletons provided by Hilt.
1. Dependencies
dependencies {
implementation 'com.squareup.retrofit2:retrofit:2.11.0'
implementation 'com.squareup.retrofit2:converter-moshi:2.11.0'
implementation 'com.squareup.retrofit2:adapter-rxjava3:2.11.0' // optional
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'