A type-safe HTTP client for Android and the JVM https://github.com/square/retrofit
|
4 months ago | |
---|---|---|
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 4 months ago |
A type-safe HTTP client for Android and Java.
For more information please see the website.
Download the latest JAR or grab from Maven central at the coordinates com.squareup.retrofit2:retrofit:2.9.0
.
Snapshots of the development version are available in Sonatype's snapshots
repository.
Retrofit requires at minimum Java 8+ or Android API 21+.
If you are using R8 the shrinking and obfuscation rules are included automatically.
ProGuard users must manually add the options from retrofit2.pro. You might also need rules for OkHttp and Okio which are dependencies of this library.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
//RxJava2
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.1.17'
implementation 'com.tspoon.traceur:traceur:1.0.1'
implementation 'com.jakewharton.rxrelay2:rxrelay:2.0.0'
//Retrofit2
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.8.1'
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
}