Showing preview only (6,552K chars total). Download the full file or copy to clipboard to get everything.
Repository: square/retrofit
Branch: trunk
Commit: 77e6ba21d9ba
Files: 1073
Total size: 6.0 MB
Directory structure:
gitextract_f65trsdv/
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── CONTRIBUTING.md
│ ├── ISSUE_TEMPLATE.md
│ ├── pull_request_template.md
│ ├── renovate.json5
│ └── workflows/
│ ├── .java-version
│ ├── build.yml
│ └── release.yaml
├── .gitignore
├── BUG-BOUNTY.md
├── CHANGELOG.md
├── LICENSE.txt
├── README.md
├── RELEASING.md
├── build.gradle
├── gradle/
│ ├── libs.versions.toml
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── retrofit/
│ ├── android-test/
│ │ ├── build.gradle
│ │ ├── debug.keystore
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ ├── BasicCallTest.java
│ │ │ ├── CompletableFutureAndroidTest.java
│ │ │ ├── DefaultMethodsAndroidTest.java
│ │ │ ├── OptionalConverterFactoryAndroidTest.java
│ │ │ └── UriAndroidTest.java
│ │ └── main/
│ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── java-test/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ └── src/
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ ├── AnnotationArraySubject.java
│ │ ├── CallAdapterTest.java
│ │ ├── CallTest.java
│ │ ├── CompletableFutureCallAdapterFactoryTest.java
│ │ ├── CompletableFutureTest.java
│ │ ├── DefaultCallAdapterFactoryTest.java
│ │ ├── DefaultMethodsTest.java
│ │ ├── HttpExceptionTest.java
│ │ ├── InvocationTest.java
│ │ ├── Java8DefaultStaticMethodsInValidationTest.java
│ │ ├── MethodParameterReflectionTest.java
│ │ ├── NonFatalError.java
│ │ ├── OptionalConverterFactoryTest.java
│ │ ├── RequestFactoryBuilderTest.java
│ │ ├── RequestFactoryTest.java
│ │ ├── ResponseTest.java
│ │ └── RetrofitTest.java
│ ├── kotlin-test/
│ │ ├── build.gradle
│ │ └── src/
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ ├── KotlinExtensionsTest.kt
│ │ ├── KotlinRequestFactoryTest.java
│ │ ├── KotlinSuspendRawTest.java
│ │ ├── KotlinSuspendTest.kt
│ │ └── KotlinUnitTest.java
│ ├── robovm-test/
│ │ ├── build.gradle
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── RoboVmPlatformTest.java
│ ├── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── retrofit2/
│ │ │ ├── AndroidMainExecutor.java
│ │ │ ├── BuiltInConverters.java
│ │ │ ├── BuiltInFactories.java
│ │ │ ├── Call.java
│ │ │ ├── CallAdapter.java
│ │ │ ├── Callback.java
│ │ │ ├── CompletableFutureCallAdapterFactory.java
│ │ │ ├── Converter.java
│ │ │ ├── DefaultCallAdapterFactory.java
│ │ │ ├── DefaultMethodSupport.java
│ │ │ ├── HttpException.java
│ │ │ ├── HttpServiceMethod.java
│ │ │ ├── Invocation.java
│ │ │ ├── KotlinExtensions.kt
│ │ │ ├── OkHttpCall.java
│ │ │ ├── OptionalConverterFactory.java
│ │ │ ├── ParameterHandler.java
│ │ │ ├── Platform.java
│ │ │ ├── Reflection.java
│ │ │ ├── RequestBuilder.java
│ │ │ ├── RequestFactory.java
│ │ │ ├── Response.java
│ │ │ ├── Retrofit.java
│ │ │ ├── ServiceMethod.java
│ │ │ ├── SkipCallbackExecutor.java
│ │ │ ├── SkipCallbackExecutorImpl.java
│ │ │ ├── Utils.java
│ │ │ ├── http/
│ │ │ │ ├── Body.java
│ │ │ │ ├── DELETE.java
│ │ │ │ ├── Field.java
│ │ │ │ ├── FieldMap.java
│ │ │ │ ├── FormUrlEncoded.java
│ │ │ │ ├── GET.java
│ │ │ │ ├── HEAD.java
│ │ │ │ ├── HTTP.java
│ │ │ │ ├── Header.java
│ │ │ │ ├── HeaderMap.java
│ │ │ │ ├── Headers.java
│ │ │ │ ├── Multipart.java
│ │ │ │ ├── OPTIONS.java
│ │ │ │ ├── PATCH.java
│ │ │ │ ├── POST.java
│ │ │ │ ├── PUT.java
│ │ │ │ ├── Part.java
│ │ │ │ ├── PartMap.java
│ │ │ │ ├── Path.java
│ │ │ │ ├── Query.java
│ │ │ │ ├── QueryMap.java
│ │ │ │ ├── QueryName.java
│ │ │ │ ├── Streaming.java
│ │ │ │ ├── Tag.java
│ │ │ │ ├── Url.java
│ │ │ │ └── package-info.java
│ │ │ ├── internal/
│ │ │ │ └── EverythingIsNonNull.java
│ │ │ └── package-info.java
│ │ ├── java14/
│ │ │ └── retrofit2/
│ │ │ └── DefaultMethodSupport.java
│ │ ├── java16/
│ │ │ └── retrofit2/
│ │ │ └── DefaultMethodSupport.java
│ │ └── resources/
│ │ └── META-INF/
│ │ └── proguard/
│ │ └── retrofit2.pro
│ └── test-helpers/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── retrofit2/
│ ├── TestingUtils.java
│ └── helpers/
│ ├── DelegatingCallAdapterFactory.java
│ ├── ExampleWithoutParameterNames.java
│ ├── NonMatchingCallAdapterFactory.java
│ ├── NonMatchingConverterFactory.java
│ ├── NullObjectConverterFactory.java
│ ├── ObjectInstanceConverterFactory.java
│ └── ToStringConverterFactory.java
├── retrofit-adapters/
│ ├── README.md
│ ├── guava/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── adapter/
│ │ │ └── guava/
│ │ │ ├── GuavaCallAdapterFactory.java
│ │ │ ├── HttpException.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── adapter/
│ │ └── guava/
│ │ ├── GuavaCallAdapterFactoryTest.java
│ │ ├── ListenableFutureTest.java
│ │ └── StringConverterFactory.java
│ ├── java8/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── adapter/
│ │ │ └── java8/
│ │ │ ├── HttpException.java
│ │ │ ├── Java8CallAdapterFactory.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── adapter/
│ │ └── java8/
│ │ ├── CompletableFutureTest.java
│ │ ├── Java8CallAdapterFactoryTest.java
│ │ └── StringConverterFactory.java
│ ├── rxjava/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── retrofit2/
│ │ │ │ └── adapter/
│ │ │ │ └── rxjava/
│ │ │ │ ├── BodyOnSubscribe.java
│ │ │ │ ├── CallArbiter.java
│ │ │ │ ├── CallEnqueueOnSubscribe.java
│ │ │ │ ├── CallExecuteOnSubscribe.java
│ │ │ │ ├── HttpException.java
│ │ │ │ ├── Result.java
│ │ │ │ ├── ResultOnSubscribe.java
│ │ │ │ ├── RxJavaCallAdapter.java
│ │ │ │ ├── RxJavaCallAdapterFactory.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── proguard/
│ │ │ └── retrofit2-rxjava-adapter.pro
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── adapter/
│ │ └── rxjava/
│ │ ├── AsyncTest.java
│ │ ├── CancelDisposeTest.java
│ │ ├── CompletableTest.java
│ │ ├── CompletableThrowingSafeSubscriberTest.java
│ │ ├── CompletableThrowingTest.java
│ │ ├── CompletableWithSchedulerTest.java
│ │ ├── ForwardingSubscriber.java
│ │ ├── ObservableTest.java
│ │ ├── ObservableThrowingSafeSubscriberTest.java
│ │ ├── ObservableThrowingTest.java
│ │ ├── ObservableWithSchedulerTest.java
│ │ ├── RecordingSubscriber.java
│ │ ├── ResultTest.java
│ │ ├── RxJavaCallAdapterFactoryTest.java
│ │ ├── RxJavaPluginsResetRule.java
│ │ ├── SingleTest.java
│ │ ├── SingleThrowingTest.java
│ │ ├── SingleWithSchedulerTest.java
│ │ └── StringConverterFactory.java
│ ├── rxjava2/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── retrofit2/
│ │ │ │ └── adapter/
│ │ │ │ └── rxjava2/
│ │ │ │ ├── BodyObservable.java
│ │ │ │ ├── CallEnqueueObservable.java
│ │ │ │ ├── CallExecuteObservable.java
│ │ │ │ ├── HttpException.java
│ │ │ │ ├── Result.java
│ │ │ │ ├── ResultObservable.java
│ │ │ │ ├── RxJava2CallAdapter.java
│ │ │ │ ├── RxJava2CallAdapterFactory.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── proguard/
│ │ │ └── retrofit2-rxjava2-adapter.pro
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── adapter/
│ │ └── rxjava2/
│ │ ├── AsyncTest.java
│ │ ├── CancelDisposeTest.java
│ │ ├── CancelDisposeTestSync.java
│ │ ├── CompletableTest.java
│ │ ├── CompletableThrowingTest.java
│ │ ├── CompletableWithSchedulerTest.java
│ │ ├── FlowableTest.java
│ │ ├── FlowableThrowingTest.java
│ │ ├── FlowableWithSchedulerTest.java
│ │ ├── MaybeTest.java
│ │ ├── MaybeThrowingTest.java
│ │ ├── MaybeWithSchedulerTest.java
│ │ ├── ObservableTest.java
│ │ ├── ObservableThrowingTest.java
│ │ ├── ObservableWithSchedulerTest.java
│ │ ├── RecordingCompletableObserver.java
│ │ ├── RecordingMaybeObserver.java
│ │ ├── RecordingObserver.java
│ │ ├── RecordingSingleObserver.java
│ │ ├── RecordingSubscriber.java
│ │ ├── ResultTest.java
│ │ ├── RxJava2CallAdapterFactoryTest.java
│ │ ├── RxJavaPluginsResetRule.java
│ │ ├── SingleTest.java
│ │ ├── SingleThrowingTest.java
│ │ ├── SingleWithSchedulerTest.java
│ │ └── StringConverterFactory.java
│ ├── rxjava3/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── retrofit2/
│ │ │ │ └── adapter/
│ │ │ │ └── rxjava3/
│ │ │ │ ├── BodyObservable.java
│ │ │ │ ├── CallEnqueueObservable.java
│ │ │ │ ├── CallExecuteObservable.java
│ │ │ │ ├── HttpException.java
│ │ │ │ ├── Result.java
│ │ │ │ ├── ResultObservable.java
│ │ │ │ ├── RxJava3CallAdapter.java
│ │ │ │ ├── RxJava3CallAdapterFactory.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── proguard/
│ │ │ └── retrofit2-rxjava3-adapter.pro
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── adapter/
│ │ └── rxjava3/
│ │ ├── AsyncTest.java
│ │ ├── CancelDisposeTest.java
│ │ ├── CancelDisposeTestSync.java
│ │ ├── CompletableTest.java
│ │ ├── CompletableThrowingTest.java
│ │ ├── CompletableWithSchedulerTest.java
│ │ ├── FlowableTest.java
│ │ ├── FlowableThrowingTest.java
│ │ ├── FlowableWithSchedulerTest.java
│ │ ├── MaybeTest.java
│ │ ├── MaybeThrowingTest.java
│ │ ├── MaybeWithSchedulerTest.java
│ │ ├── ObservableTest.java
│ │ ├── ObservableThrowingTest.java
│ │ ├── ObservableWithSchedulerTest.java
│ │ ├── RecordingCompletableObserver.java
│ │ ├── RecordingMaybeObserver.java
│ │ ├── RecordingObserver.java
│ │ ├── RecordingSingleObserver.java
│ │ ├── RecordingSubscriber.java
│ │ ├── ResultTest.java
│ │ ├── RxJava3CallAdapterFactoryTest.java
│ │ ├── RxJavaPluginsResetRule.java
│ │ ├── SingleTest.java
│ │ ├── SingleThrowingTest.java
│ │ ├── SingleWithSchedulerTest.java
│ │ └── StringConverterFactory.java
│ └── scala/
│ ├── README.md
│ ├── build.gradle
│ ├── gradle.properties
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── adapter/
│ │ └── scala/
│ │ ├── BodyCallAdapter.java
│ │ ├── ResponseCallAdapter.java
│ │ ├── ScalaCallAdapterFactory.java
│ │ └── package-info.java
│ └── test/
│ └── java/
│ └── retrofit2/
│ └── adapter/
│ └── scala/
│ ├── FutureTest.java
│ ├── ScalaCallAdapterFactoryTest.java
│ └── StringConverterFactory.java
├── retrofit-bom/
│ ├── build.gradle
│ └── gradle.properties
├── retrofit-converters/
│ ├── README.md
│ ├── gson/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── gson/
│ │ │ ├── GsonConverterFactory.java
│ │ │ ├── GsonRequestBodyConverter.java
│ │ │ ├── GsonResponseBodyConverter.java
│ │ │ ├── GsonStreamingRequestBody.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── gson/
│ │ └── GsonConverterFactoryTest.java
│ ├── guava/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── retrofit/
│ │ │ │ └── converter/
│ │ │ │ └── guava/
│ │ │ │ ├── GuavaOptionalConverterFactory.java
│ │ │ │ ├── OptionalConverter.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── proguard/
│ │ │ └── retrofit2-guava-converter.pro
│ │ └── test/
│ │ └── java/
│ │ └── retrofit/
│ │ └── converter/
│ │ └── guava/
│ │ ├── AlwaysNullConverterFactory.java
│ │ └── GuavaOptionalConverterFactoryTest.java
│ ├── jackson/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── jackson/
│ │ │ ├── JacksonConverterFactory.java
│ │ │ ├── JacksonRequestBodyConverter.java
│ │ │ ├── JacksonResponseBodyConverter.java
│ │ │ ├── JacksonStreamingRequestBody.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── jackson/
│ │ ├── JacksonCborConverterFactoryTest.java
│ │ └── JacksonConverterFactoryTest.java
│ ├── java8/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit/
│ │ │ └── converter/
│ │ │ └── java8/
│ │ │ ├── Java8OptionalConverterFactory.java
│ │ │ ├── OptionalConverter.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit/
│ │ └── converter/
│ │ └── java8/
│ │ ├── AlwaysNullConverterFactory.java
│ │ └── Java8OptionalConverterFactoryTest.java
│ ├── jaxb/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── jaxb/
│ │ │ ├── JaxbConverterFactory.java
│ │ │ ├── JaxbRequestConverter.java
│ │ │ ├── JaxbResponseConverter.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── jaxb/
│ │ ├── Contact.java
│ │ ├── JaxbConverterFactoryTest.java
│ │ ├── PhoneNumber.java
│ │ └── Type.java
│ ├── jaxb3/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── jaxb3/
│ │ │ ├── JaxbConverterFactory.java
│ │ │ ├── JaxbRequestConverter.java
│ │ │ ├── JaxbResponseConverter.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── jaxb3/
│ │ ├── Contact.java
│ │ ├── JaxbConverterFactoryTest.java
│ │ ├── PhoneNumber.java
│ │ └── Type.java
│ ├── kotlinx-serialization/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── kotlinx/
│ │ │ └── serialization/
│ │ │ ├── DeserializationStrategyConverter.kt
│ │ │ ├── Factory.kt
│ │ │ ├── SerializationStrategyConverter.kt
│ │ │ └── Serializer.kt
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── kotlinx/
│ │ └── serialization/
│ │ ├── KotlinSerializationConverterFactoryBytesTest.kt
│ │ ├── KotlinSerializationConverterFactoryStringTest.kt
│ │ ├── KotlinxSerializationConverterFactoryContextualListTest.kt
│ │ └── KotlinxSerializationConverterFactoryContextualTest.kt
│ ├── moshi/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── moshi/
│ │ │ ├── MoshiConverterFactory.java
│ │ │ ├── MoshiRequestBodyConverter.java
│ │ │ ├── MoshiResponseBodyConverter.java
│ │ │ ├── MoshiStreamingRequestBody.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── moshi/
│ │ └── MoshiConverterFactoryTest.java
│ ├── protobuf/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── retrofit2/
│ │ │ │ └── converter/
│ │ │ │ └── protobuf/
│ │ │ │ ├── ProtoConverterFactory.java
│ │ │ │ ├── ProtoRequestBodyConverter.java
│ │ │ │ ├── ProtoResponseBodyConverter.java
│ │ │ │ ├── ProtoStreamingRequestBody.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── proguard/
│ │ │ └── retrofit2-protobuf-converter.pro
│ │ └── test/
│ │ ├── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── protobuf/
│ │ │ ├── FallbackParserFinderTest.java
│ │ │ └── ProtoConverterFactoryTest.java
│ │ └── proto/
│ │ └── phone.proto
│ ├── scalars/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── scalars/
│ │ │ ├── ScalarRequestBodyConverter.java
│ │ │ ├── ScalarResponseBodyConverters.java
│ │ │ ├── ScalarsConverterFactory.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── scalars/
│ │ ├── ScalarsConverterFactoryTest.java
│ │ └── ScalarsConverterPrimitivesFactoryTest.java
│ ├── simplexml/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── simplexml/
│ │ │ ├── SimpleXmlConverterFactory.java
│ │ │ ├── SimpleXmlRequestBodyConverter.java
│ │ │ ├── SimpleXmlResponseBodyConverter.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── simplexml/
│ │ ├── MyObject.java
│ │ └── SimpleXmlConverterFactoryTest.java
│ └── wire/
│ ├── README.md
│ ├── build.gradle
│ ├── gradle.properties
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── wire/
│ │ │ ├── WireConverterFactory.java
│ │ │ ├── WireRequestBodyConverter.java
│ │ │ ├── WireResponseBodyConverter.java
│ │ │ ├── WireStreamingRequestBody.java
│ │ │ └── package-info.java
│ │ └── resources/
│ │ └── META-INF/
│ │ └── proguard/
│ │ └── retrofit2-wire-converter.pro
│ └── test/
│ └── java/
│ └── retrofit2/
│ └── converter/
│ └── wire/
│ ├── CrashingPhone.java
│ ├── Phone.java
│ └── WireConverterFactoryTest.java
├── retrofit-mock/
│ ├── README.md
│ ├── build.gradle
│ ├── gradle.properties
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── mock/
│ │ ├── BehaviorCall.java
│ │ ├── BehaviorDelegate.java
│ │ ├── Calls.java
│ │ ├── KotlinExtensions.kt
│ │ ├── MockRetrofit.java
│ │ ├── MockRetrofitIOException.java
│ │ ├── NetworkBehavior.java
│ │ └── package-info.java
│ └── test/
│ └── java/
│ └── retrofit2/
│ └── mock/
│ ├── BehaviorDelegateKotlinTest.kt
│ ├── BehaviorDelegateTest.java
│ ├── CallsTest.java
│ ├── MockRetrofitTest.java
│ └── NetworkBehaviorTest.java
├── retrofit-response-type-keeper/
│ ├── README.md
│ ├── build.gradle
│ ├── gradle.properties
│ └── src/
│ ├── main/
│ │ ├── kotlin/
│ │ │ └── retrofit2/
│ │ │ └── keeper/
│ │ │ └── RetrofitResponseTypeKeepProcessor.kt
│ │ └── resources/
│ │ └── META-INF/
│ │ ├── gradle/
│ │ │ └── incremental.annotation.processors
│ │ └── services/
│ │ └── javax.annotation.processing.Processor
│ └── test/
│ └── kotlin/
│ └── retrofit2/
│ └── keeper/
│ └── RetrofitResponseTypeKeepProcessorTest.kt
├── samples/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── example/
│ └── retrofit/
│ ├── AnnotatedConverters.java
│ ├── ChunkingConverter.java
│ ├── ConditionalLoggingInterceptor.kt
│ ├── Crawler.java
│ ├── DeserializeErrorBody.java
│ ├── DynamicBaseUrl.java
│ ├── ErrorHandlingAdapter.java
│ ├── InvocationMetrics.java
│ ├── JsonAndXmlConverters.java
│ ├── JsonQueryParameters.java
│ ├── RxJavaObserveOnMainThread.java
│ ├── SimpleMockService.java
│ ├── SimpleService.java
│ └── package-info.java
├── settings.gradle
└── website/
├── .gitignore
├── README.md
├── astro.config.mjs
├── package.json
├── public/
│ ├── 1.x/
│ │ ├── converter-jackson/
│ │ │ ├── allclasses-frame.html
│ │ │ ├── allclasses-noframe.html
│ │ │ ├── constant-values.html
│ │ │ ├── deprecated-list.html
│ │ │ ├── help-doc.html
│ │ │ ├── index-all.html
│ │ │ ├── index.html
│ │ │ ├── overview-tree.html
│ │ │ ├── package-list
│ │ │ ├── retrofit/
│ │ │ │ └── converter/
│ │ │ │ ├── JacksonConverter.html
│ │ │ │ ├── class-use/
│ │ │ │ │ └── JacksonConverter.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ ├── script.js
│ │ │ ├── stylesheet.css
│ │ │ └── version.txt
│ │ ├── converter-protobuf/
│ │ │ ├── allclasses-frame.html
│ │ │ ├── allclasses-noframe.html
│ │ │ ├── constant-values.html
│ │ │ ├── deprecated-list.html
│ │ │ ├── help-doc.html
│ │ │ ├── index-all.html
│ │ │ ├── index.html
│ │ │ ├── overview-tree.html
│ │ │ ├── package-list
│ │ │ ├── retrofit/
│ │ │ │ └── converter/
│ │ │ │ ├── ProtoConverter.html
│ │ │ │ ├── class-use/
│ │ │ │ │ └── ProtoConverter.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ ├── script.js
│ │ │ ├── stylesheet.css
│ │ │ └── version.txt
│ │ ├── converter-simplexml/
│ │ │ ├── allclasses-frame.html
│ │ │ ├── allclasses-noframe.html
│ │ │ ├── constant-values.html
│ │ │ ├── deprecated-list.html
│ │ │ ├── help-doc.html
│ │ │ ├── index-all.html
│ │ │ ├── index.html
│ │ │ ├── overview-tree.html
│ │ │ ├── package-list
│ │ │ ├── retrofit/
│ │ │ │ └── converter/
│ │ │ │ ├── SimpleXMLConverter.html
│ │ │ │ ├── class-use/
│ │ │ │ │ └── SimpleXMLConverter.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ ├── script.js
│ │ │ ├── stylesheet.css
│ │ │ └── version.txt
│ │ ├── converter-wire/
│ │ │ ├── allclasses-frame.html
│ │ │ ├── allclasses-noframe.html
│ │ │ ├── constant-values.html
│ │ │ ├── deprecated-list.html
│ │ │ ├── help-doc.html
│ │ │ ├── index-all.html
│ │ │ ├── index.html
│ │ │ ├── overview-tree.html
│ │ │ ├── package-list
│ │ │ ├── retrofit/
│ │ │ │ └── converter/
│ │ │ │ ├── WireConverter.html
│ │ │ │ ├── class-use/
│ │ │ │ │ └── WireConverter.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ ├── script.js
│ │ │ ├── stylesheet.css
│ │ │ └── version.txt
│ │ ├── retrofit/
│ │ │ ├── allclasses-frame.html
│ │ │ ├── allclasses-noframe.html
│ │ │ ├── constant-values.html
│ │ │ ├── deprecated-list.html
│ │ │ ├── help-doc.html
│ │ │ ├── index-all.html
│ │ │ ├── index.html
│ │ │ ├── overview-frame.html
│ │ │ ├── overview-summary.html
│ │ │ ├── overview-tree.html
│ │ │ ├── package-list
│ │ │ ├── retrofit/
│ │ │ │ ├── Callback.html
│ │ │ │ ├── Endpoint.html
│ │ │ │ ├── Endpoints.html
│ │ │ │ ├── ErrorHandler.html
│ │ │ │ ├── Profiler.RequestInformation.html
│ │ │ │ ├── Profiler.html
│ │ │ │ ├── RequestInterceptor.RequestFacade.html
│ │ │ │ ├── RequestInterceptor.html
│ │ │ │ ├── ResponseCallback.html
│ │ │ │ ├── RestAdapter.Builder.html
│ │ │ │ ├── RestAdapter.Log.html
│ │ │ │ ├── RestAdapter.LogLevel.html
│ │ │ │ ├── RestAdapter.html
│ │ │ │ ├── RetrofitError.Kind.html
│ │ │ │ ├── RetrofitError.html
│ │ │ │ ├── android/
│ │ │ │ │ ├── AndroidApacheClient.html
│ │ │ │ │ ├── AndroidLog.html
│ │ │ │ │ ├── MainThreadExecutor.html
│ │ │ │ │ ├── class-use/
│ │ │ │ │ │ ├── AndroidApacheClient.html
│ │ │ │ │ │ ├── AndroidLog.html
│ │ │ │ │ │ └── MainThreadExecutor.html
│ │ │ │ │ ├── package-frame.html
│ │ │ │ │ ├── package-summary.html
│ │ │ │ │ ├── package-tree.html
│ │ │ │ │ └── package-use.html
│ │ │ │ ├── appengine/
│ │ │ │ │ ├── UrlFetchClient.html
│ │ │ │ │ ├── class-use/
│ │ │ │ │ │ └── UrlFetchClient.html
│ │ │ │ │ ├── package-frame.html
│ │ │ │ │ ├── package-summary.html
│ │ │ │ │ ├── package-tree.html
│ │ │ │ │ └── package-use.html
│ │ │ │ ├── class-use/
│ │ │ │ │ ├── Callback.html
│ │ │ │ │ ├── Endpoint.html
│ │ │ │ │ ├── Endpoints.html
│ │ │ │ │ ├── ErrorHandler.html
│ │ │ │ │ ├── Profiler.RequestInformation.html
│ │ │ │ │ ├── Profiler.html
│ │ │ │ │ ├── RequestInterceptor.RequestFacade.html
│ │ │ │ │ ├── RequestInterceptor.html
│ │ │ │ │ ├── ResponseCallback.html
│ │ │ │ │ ├── RestAdapter.Builder.html
│ │ │ │ │ ├── RestAdapter.Log.html
│ │ │ │ │ ├── RestAdapter.LogLevel.html
│ │ │ │ │ ├── RestAdapter.html
│ │ │ │ │ ├── RetrofitError.Kind.html
│ │ │ │ │ └── RetrofitError.html
│ │ │ │ ├── client/
│ │ │ │ │ ├── ApacheClient.html
│ │ │ │ │ ├── Client.Provider.html
│ │ │ │ │ ├── Client.html
│ │ │ │ │ ├── Header.html
│ │ │ │ │ ├── OkClient.html
│ │ │ │ │ ├── Request.html
│ │ │ │ │ ├── Response.html
│ │ │ │ │ ├── UrlConnectionClient.html
│ │ │ │ │ ├── class-use/
│ │ │ │ │ │ ├── ApacheClient.html
│ │ │ │ │ │ ├── Client.Provider.html
│ │ │ │ │ │ ├── Client.html
│ │ │ │ │ │ ├── Header.html
│ │ │ │ │ │ ├── OkClient.html
│ │ │ │ │ │ ├── Request.html
│ │ │ │ │ │ ├── Response.html
│ │ │ │ │ │ └── UrlConnectionClient.html
│ │ │ │ │ ├── package-frame.html
│ │ │ │ │ ├── package-summary.html
│ │ │ │ │ ├── package-tree.html
│ │ │ │ │ └── package-use.html
│ │ │ │ ├── converter/
│ │ │ │ │ ├── ConversionException.html
│ │ │ │ │ ├── Converter.html
│ │ │ │ │ ├── GsonConverter.html
│ │ │ │ │ ├── class-use/
│ │ │ │ │ │ ├── ConversionException.html
│ │ │ │ │ │ ├── Converter.html
│ │ │ │ │ │ └── GsonConverter.html
│ │ │ │ │ ├── package-frame.html
│ │ │ │ │ ├── package-summary.html
│ │ │ │ │ ├── package-tree.html
│ │ │ │ │ └── package-use.html
│ │ │ │ ├── http/
│ │ │ │ │ ├── Body.html
│ │ │ │ │ ├── DELETE.html
│ │ │ │ │ ├── EncodedPath.html
│ │ │ │ │ ├── EncodedQuery.html
│ │ │ │ │ ├── EncodedQueryMap.html
│ │ │ │ │ ├── Field.html
│ │ │ │ │ ├── FieldMap.html
│ │ │ │ │ ├── FormUrlEncoded.html
│ │ │ │ │ ├── GET.html
│ │ │ │ │ ├── HEAD.html
│ │ │ │ │ ├── Header.html
│ │ │ │ │ ├── Headers.html
│ │ │ │ │ ├── Multipart.html
│ │ │ │ │ ├── PATCH.html
│ │ │ │ │ ├── POST.html
│ │ │ │ │ ├── PUT.html
│ │ │ │ │ ├── Part.html
│ │ │ │ │ ├── PartMap.html
│ │ │ │ │ ├── Path.html
│ │ │ │ │ ├── Query.html
│ │ │ │ │ ├── QueryMap.html
│ │ │ │ │ ├── RestMethod.html
│ │ │ │ │ ├── Streaming.html
│ │ │ │ │ ├── class-use/
│ │ │ │ │ │ ├── Body.html
│ │ │ │ │ │ ├── DELETE.html
│ │ │ │ │ │ ├── EncodedPath.html
│ │ │ │ │ │ ├── EncodedQuery.html
│ │ │ │ │ │ ├── EncodedQueryMap.html
│ │ │ │ │ │ ├── Field.html
│ │ │ │ │ │ ├── FieldMap.html
│ │ │ │ │ │ ├── FormUrlEncoded.html
│ │ │ │ │ │ ├── GET.html
│ │ │ │ │ │ ├── HEAD.html
│ │ │ │ │ │ ├── Header.html
│ │ │ │ │ │ ├── Headers.html
│ │ │ │ │ │ ├── Multipart.html
│ │ │ │ │ │ ├── PATCH.html
│ │ │ │ │ │ ├── POST.html
│ │ │ │ │ │ ├── PUT.html
│ │ │ │ │ │ ├── Part.html
│ │ │ │ │ │ ├── PartMap.html
│ │ │ │ │ │ ├── Path.html
│ │ │ │ │ │ ├── Query.html
│ │ │ │ │ │ ├── QueryMap.html
│ │ │ │ │ │ ├── RestMethod.html
│ │ │ │ │ │ └── Streaming.html
│ │ │ │ │ ├── package-frame.html
│ │ │ │ │ ├── package-summary.html
│ │ │ │ │ ├── package-tree.html
│ │ │ │ │ └── package-use.html
│ │ │ │ ├── mime/
│ │ │ │ │ ├── FormUrlEncodedTypedOutput.html
│ │ │ │ │ ├── MimeUtil.html
│ │ │ │ │ ├── MultipartTypedOutput.html
│ │ │ │ │ ├── TypedByteArray.html
│ │ │ │ │ ├── TypedFile.html
│ │ │ │ │ ├── TypedInput.html
│ │ │ │ │ ├── TypedOutput.html
│ │ │ │ │ ├── TypedString.html
│ │ │ │ │ ├── class-use/
│ │ │ │ │ │ ├── FormUrlEncodedTypedOutput.html
│ │ │ │ │ │ ├── MimeUtil.html
│ │ │ │ │ │ ├── MultipartTypedOutput.html
│ │ │ │ │ │ ├── TypedByteArray.html
│ │ │ │ │ │ ├── TypedFile.html
│ │ │ │ │ │ ├── TypedInput.html
│ │ │ │ │ │ ├── TypedOutput.html
│ │ │ │ │ │ └── TypedString.html
│ │ │ │ │ ├── package-frame.html
│ │ │ │ │ ├── package-summary.html
│ │ │ │ │ ├── package-tree.html
│ │ │ │ │ └── package-use.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ ├── script.js
│ │ │ ├── serialized-form.html
│ │ │ ├── stylesheet.css
│ │ │ └── version.txt
│ │ └── retrofit-mock/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-frame.html
│ │ ├── overview-summary.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit/
│ │ │ ├── MockHttpException.html
│ │ │ ├── MockRestAdapter.ValueChangeListener.html
│ │ │ ├── MockRestAdapter.html
│ │ │ ├── android/
│ │ │ │ ├── AndroidMockValuePersistence.html
│ │ │ │ ├── class-use/
│ │ │ │ │ └── AndroidMockValuePersistence.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ ├── class-use/
│ │ │ │ ├── MockHttpException.html
│ │ │ │ ├── MockRestAdapter.ValueChangeListener.html
│ │ │ │ └── MockRestAdapter.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ ├── package-tree.html
│ │ │ └── package-use.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ ├── stylesheet.css
│ │ └── version.txt
│ └── 2.x/
│ ├── adapter-guava/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── adapter/
│ │ │ └── guava/
│ │ │ ├── GuavaCallAdapterFactory.html
│ │ │ ├── HttpException.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ └── stylesheet.css
│ ├── adapter-java8/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── adapter/
│ │ │ └── java8/
│ │ │ ├── HttpException.html
│ │ │ ├── Java8CallAdapterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ └── stylesheet.css
│ ├── adapter-rxjava/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── adapter/
│ │ │ └── rxjava/
│ │ │ ├── HttpException.html
│ │ │ ├── Result.html
│ │ │ ├── RxJavaCallAdapterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ └── stylesheet.css
│ ├── adapter-rxjava2/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── adapter/
│ │ │ └── rxjava2/
│ │ │ ├── HttpException.html
│ │ │ ├── Result.html
│ │ │ ├── RxJava2CallAdapterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ └── stylesheet.css
│ ├── adapter-rxjava3/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── adapter/
│ │ │ └── rxjava3/
│ │ │ ├── HttpException.html
│ │ │ ├── Result.html
│ │ │ ├── RxJava3CallAdapterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ └── stylesheet.css
│ ├── adapter-scala/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── adapter/
│ │ │ └── scala/
│ │ │ ├── ScalaCallAdapterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-gson/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── gson/
│ │ │ ├── GsonConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-guava/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit/
│ │ │ └── converter/
│ │ │ └── guava/
│ │ │ ├── GuavaOptionalConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-jackson/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── jackson/
│ │ │ ├── JacksonConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-java8/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit/
│ │ │ └── converter/
│ │ │ └── java8/
│ │ │ ├── Java8OptionalConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-jaxb/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── jaxb/
│ │ │ ├── JaxbConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-jaxb3/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── jaxb3/
│ │ │ ├── JaxbConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-kotlinx-serialization/
│ │ ├── index.html
│ │ ├── kotlinx-serialization/
│ │ │ ├── package-list
│ │ │ └── retrofit2.converter.kotlinx.serialization/
│ │ │ ├── as-converter-factory.html
│ │ │ └── index.html
│ │ ├── navigation.html
│ │ ├── scripts/
│ │ │ ├── clipboard.js
│ │ │ ├── main.js
│ │ │ ├── navigation-loader.js
│ │ │ ├── pages.json
│ │ │ ├── platform-content-handler.js
│ │ │ ├── prism.js
│ │ │ ├── sourceset_dependencies.js
│ │ │ └── symbol-parameters-wrapper_deferred.js
│ │ └── styles/
│ │ ├── font-jb-sans-auto.css
│ │ ├── logo-styles.css
│ │ ├── main.css
│ │ ├── prism.css
│ │ └── style.css
│ ├── converter-moshi/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── moshi/
│ │ │ ├── MoshiConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-protobuf/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── protobuf/
│ │ │ ├── ProtoConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-scalars/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── scalars/
│ │ │ ├── ScalarsConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-simplexml/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── simplexml/
│ │ │ ├── SimpleXmlConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-wire/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── wire/
│ │ │ ├── WireConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── retrofit/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-frame.html
│ │ ├── overview-summary.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ ├── Call.html
│ │ │ ├── CallAdapter.Factory.html
│ │ │ ├── CallAdapter.html
│ │ │ ├── Callback.html
│ │ │ ├── Converter.Factory.html
│ │ │ ├── Converter.html
│ │ │ ├── HttpException.html
│ │ │ ├── Invocation.html
│ │ │ ├── OptionalConverterFactory.html
│ │ │ ├── Response.html
│ │ │ ├── Retrofit.Builder.html
│ │ │ ├── Retrofit.html
│ │ │ ├── SkipCallbackExecutor.html
│ │ │ ├── http/
│ │ │ │ ├── Body.html
│ │ │ │ ├── DELETE.html
│ │ │ │ ├── Field.html
│ │ │ │ ├── FieldMap.html
│ │ │ │ ├── FormUrlEncoded.html
│ │ │ │ ├── GET.html
│ │ │ │ ├── HEAD.html
│ │ │ │ ├── HTTP.html
│ │ │ │ ├── Header.html
│ │ │ │ ├── HeaderMap.html
│ │ │ │ ├── Headers.html
│ │ │ │ ├── Multipart.html
│ │ │ │ ├── OPTIONS.html
│ │ │ │ ├── PATCH.html
│ │ │ │ ├── POST.html
│ │ │ │ ├── PUT.html
│ │ │ │ ├── Part.html
│ │ │ │ ├── PartMap.html
│ │ │ │ ├── Path.html
│ │ │ │ ├── Query.html
│ │ │ │ ├── QueryMap.html
│ │ │ │ ├── QueryName.html
│ │ │ │ ├── Streaming.html
│ │ │ │ ├── Tag.html
│ │ │ │ ├── Url.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ └── package-tree.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ └── stylesheet.css
│ └── retrofit-mock/
│ ├── allclasses-frame.html
│ ├── allclasses-noframe.html
│ ├── constant-values.html
│ ├── deprecated-list.html
│ ├── help-doc.html
│ ├── index-all.html
│ ├── index.html
│ ├── overview-tree.html
│ ├── package-list
│ ├── retrofit2/
│ │ └── mock/
│ │ ├── BehaviorDelegate.html
│ │ ├── Calls.html
│ │ ├── MockRetrofit.Builder.html
│ │ ├── MockRetrofit.html
│ │ ├── NetworkBehavior.html
│ │ ├── package-frame.html
│ │ ├── package-summary.html
│ │ └── package-tree.html
│ ├── script.js
│ └── stylesheet.css
├── src/
│ ├── content/
│ │ └── docs/
│ │ ├── configuration.md
│ │ ├── contributing.md
│ │ ├── declarations.md
│ │ ├── download.mdx
│ │ └── index.md
│ ├── content.config.ts
│ └── styles/
│ └── theme.css
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
[*]
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.{kt,kts}]
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
ij_kotlin_imports_layout = *
[*.mjs]
indent_style = tab
[*.ts]
indent_style = tab
[*.css]
indent_style = tab
================================================
FILE: .gitattributes
================================================
* text=auto eol=lf
*.bat text eol=crlf
*.jar binary
================================================
FILE: .github/CONTRIBUTING.md
================================================
Contributing
============
If you would like to contribute code to Retrofit you can do so through GitHub by
forking the repository and sending a pull request.
When submitting code, please make every effort to follow existing conventions
and style in order to keep the code as readable as possible. Please also make
sure your code compiles by running `./gradlew build` (or `gradlew.bat build` on Windows).
Before your code can be accepted into the project you must also sign the
[Individual Contributor License Agreement (CLA)][1].
[1]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
What kind of issue is this?
- [ ] Question. This issue tracker is not the place for questions. If you want to ask how to do
something, or to understand why something isn't working the way you expect it to, use Stack
Overflow. https://stackoverflow.com/questions/tagged/retrofit
- [ ] Bug report. If you’ve found a bug, spend the time to write a failing test. Bugs with tests
get fixed. Here’s an example: https://gist.github.com/swankjesse/6608b4713ad80988cdc9
- [ ] Feature Request. Start by telling us what problem you’re trying to solve. Often a solution
already exists! Don’t send pull requests to implement new features without first getting our
support. Sometimes we leave features out on purpose to keep the project small.
================================================
FILE: .github/pull_request_template.md
================================================
---
- [ ] `CHANGELOG.md`'s "Unreleased" section has been updated, if applicable.
================================================
FILE: .github/renovate.json5
================================================
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:recommended',
],
ignorePresets: [
// Ensure we get the latest version and are not pinned to old versions.
'workarounds:javaLTSVersions',
],
customManagers: [
// Update .java-version file with the latest JDK version.
{
customType: 'regex',
fileMatch: [
'\\.java-version$',
],
matchStrings: [
'(?<currentValue>.*)\\n',
],
datasourceTemplate: 'java-version',
depNameTemplate: 'java',
// Only write the major version.
extractVersionTemplate: '^(?<version>\\d+)',
},
]
}
================================================
FILE: .github/workflows/.java-version
================================================
25
================================================
FILE: .github/workflows/build.yml
================================================
name: build
on:
pull_request: {}
workflow_dispatch: {}
push:
branches:
- 'trunk'
tags-ignore:
- '**'
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false -Dorg.gradle.logging.stacktrace=full"
jobs:
jvm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version-file: .github/workflows/.java-version
- uses: gradle/actions/setup-gradle@v5
- run: ./gradlew build
android:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
api-level:
- 21
- 24
- 26
- 29
steps:
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
ls /dev/kvm
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version-file: .github/workflows/.java-version
- uses: gradle/actions/setup-gradle@v5
- name: Run Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
script: ./gradlew connectedCheck
env:
API_LEVEL: ${{ matrix.api-level }}
robovm:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version-file: .github/workflows/.java-version
- uses: gradle/actions/setup-gradle@v5
- name: Run Tests
run: ./gradlew retrofit:robovm-test:robovmTest
website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version-file: .github/workflows/.java-version
- uses: gradle/actions/setup-gradle@v5
- name: Build snapshot website
run: |
./gradlew copyWebsiteDocs
cd website
npm install && npm run build -- --mode snapshot
- uses: actions/upload-artifact@v7
with:
name: website
path: website/dist
if-no-files-found: error
final-status:
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
needs:
- jvm
- android
- robovm
- website
steps:
- name: Check
run: |
results=$(tr -d '\n' <<< '${{ toJSON(needs.*.result) }}')
if ! grep -q -v -E '(failure|cancelled)' <<< "$results"; then
echo "One or more required jobs failed"
exit 1
fi
publish:
runs-on: ubuntu-latest
if: github.repository == 'square/retrofit' && github.ref == 'refs/heads/trunk'
needs:
- final-status
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version-file: .github/workflows/.java-version
- uses: gradle/actions/setup-gradle@v5
- run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SECRET_PASSPHRASE }}
- uses: actions/download-artifact@v8
with:
name: website
path: website/dist
- name: Deploy snapshot website
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
branch: site
folder: website/dist
target_folder: latest
clean: true
================================================
FILE: .github/workflows/release.yaml
================================================
name: release
on:
push:
tags:
- '**'
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false -Dorg.gradle.logging.stacktrace=full"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version-file: .github/workflows/.java-version
- run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SECRET_PASSPHRASE }}
- name: Extract release notes
id: release_notes
uses: ffurrer2/extract-release-notes@v3
- name: Create release
uses: ncipollo/release-action@v1
with:
body: ${{ steps.release_notes.outputs.release_notes }}
discussionCategory: Announcements
- name: Build release website
run: |
./gradlew copyWebsiteDocs
cd website
npm install && npm run build -- --mode release
- name: Deploy release website
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
branch: site
folder: website/dist
clean: true
clean-exclude: |
.nojekyll
latest/**
================================================
FILE: .gitignore
================================================
# Gradle
.gradle
build
/reports
local.properties
# Idea
.idea
*.iml
================================================
FILE: BUG-BOUNTY.md
================================================
Serious about security
======================
Square recognizes the important contributions the security research community
can make. We therefore encourage reporting security issues with the code
contained in this repository.
If you believe you have discovered a security vulnerability, please follow the
guidelines at https://bugcrowd.com/squareopensource
================================================
FILE: CHANGELOG.md
================================================
# Change Log
## [Unreleased]
[Unreleased]: https://github.com/square/retrofit/compare/3.0.0...HEAD
**New**
- Add explicit keep rules for RxJava `Result` types to prevent their generic information from being removed.
- Add `allowoptimization` flags for most kept types.
- Add `Invocation.annotationUrl` which returns the original URL from the method annotation.
**Changed**
- In-development snapshots are now published to the Central Portal Snapshots repository at https://central.sonatype.com/repository/maven-snapshots/.
**Fixed**
- Nothing yet!
## [3.0.0] - 2025-05-15
[3.0.0]: https://github.com/square/retrofit/releases/tag/3.0.0
**Changed**
- Upgrade to OkHttp 4.12 (from 3.14).
This is the version of OkHttp that is written in Kotlin, and as a result Retrofit now has a transitive Kotlin dependency. However, this is also the _supported_ version of OkHttp whereas the previous version was out of support for nearly 4 years.
Note: The 3.x versions of Retrofit maintain forward binary-compatibility with the 2.x versions.
This means libraries compiled against 2.x can still be used with the 3.x versions.
## [2.12.0] - 2025-05-15
[2.12.0]: https://github.com/square/retrofit/releases/tag/2.12.0
**New**
- First-party converters now support deferring serialization to happen when the request body is written (i.e., during HTTP execution) rather than when the HTTP request is created. In some cases this moves conversion from a calling thread to a background thread, such as in the case when using `Call.enqueue` directly.
The following converters support this feature through a new `withStreaming()` factory method:
- Gson
- Jackson
- Moshi
- Protobuf
- Wire
**Fixed**
- Primitive types used with `@Tag` now work by storing the value boxed with the boxed class as the key.
## [2.11.0] - 2024-03-28
**New**
- The built-in `OptionalConverterFactory` is now public to allow installing it before other converters which consume all types (e.g., Moshi, Gson, Jackson, etc.).
**Fixed**
- Ensure that exceptions thrown from failure to parse method annotations can be observed by multiple threads/callers. Previously only the first caller would see the actual parsing exception and other callers would get a cryptic `ClassCastException`.
## [2.10.0] - 2024-03-18
**New**
- Support using `Unit` as a response type. This can be used for non-body HTTP methods like `HEAD` or body-containing HTTP methods like `GET` where the body will be discarded without deserialization.
- kotlinx.serialization converter!
This was imported from [github.com/JakeWharton/retrofit2-kotlinx-serialization-converter/](https://github.com/JakeWharton/retrofit2-kotlinx-serialization-converter/) and remains unchanged from its 1.0.0 release.
The Maven coordinates are `com.squareup.retrofit2:converter-kotlinx-serialization`.
- JAXB 3 converter!
The Maven coordinates are `com.squareup.retrofit2:converter-jaxb3`.
- `@Header`, `@Headers`, and `@HeaderMap` can now set non-ASCII values through the `allowUnsafeNonAsciiValues` annotation property. These are not technically compliant with the HTTP specification, but are often supported or required by services.
- Publish a BOM of all modules. The Maven coordinates are `com.squareup.retrofit2:retrofit-bom`.
- `Invocation` now exposes the service `Class<?>` and the instance on which the method was invoked. This disambiguates the source when service inheritence is used.
- A response type keeper annotation processor is now available for generating shrinker rules for all referenced types in your service interface. In some cases, it's impossible for static shrinker rules to keep the entirety of what Retrofit needs at runtime. This annotation processor generates those additional rules. For more info see [its README](https://github.com/square/retrofit/tree/trunk/retrofit-response-type-keeper#readme).
**Changed**
- Add shrinker rules to retain the generic signatures of built-in types (`Call`, `Response`, etc.) which are used via reflection at runtime.
- Remove backpressure support from RxJava 2 and 3 adapters. Since we only deliver a single value and the Reactive Streams specification states that callers must request a non-zero subscription value, we never need to honor backpressure.
- Kotlin `Retrofit.create` function now has a non-null lower bound. Even if you specified a nullable type before this function would never return null.
- Suspend functions now capture and defer all `Throwable` subtypes (not just `Exception` subtypes) to avoid Java's `UndeclaredThrowableException` when thrown synchronously.
- Eagerly reject `suspend fun` functions that return `Call<Body>`. These are never correct, and should declare a return type of `Body` directly.
- Support for Java 14-specific and Java 16-specific reflection needed to invoke default methods on interfaces have been moved to separate versions of a class through a multi-release jar. This should have no observable impact other than the jar now contains classes which target Java 14 and Java 16 bytecode that might trip up some static analysis tools which are not aware of multi-release jars.
- Parameter names are now displayed in exception messages when available in the underlying Java bytecode.
- Jackson converter now supports binary formats by using byte streams rather than character streams in its implementation. Use the `create(ObjectMapper, MediaType)` overload to supply the value of the `Content-Type` header for your format.
**Fixed**
- Do not include synthetic methods when doing eager validation.
- Use per-method rather than per-class locking when parsing annotations. This eliminates contention when multiple calls are made in quick succession at the beginning of the process lifetime.
## [2.9.0] - 2020-05-20
* New: RxJava 3 adapter!
The Maven coordinates are `com.squareup.retrofit2:adapter-rxjava3`.
Unlike the RxJava 1 and RxJava 2 adapters, the RxJava 3 adapter's `create()` method will produce asynchronous HTTP requests by default. For synchronous requests use `createSynchronous()` and for synchronous on a scheduler use `createWithScheduler(..)`.
## [2.8.2] - 2020-05-18
* Fix: Detect running on the Android platform by using system property rather than the presence of classes.
This ensures that even when you're running on the JVM with Android classes present on the classpath you
get JVM semantics.
* Fix: Update to OkHttp 3.14.9 which contains an associated Android platform detection fix.
## [2.8.1] - 2020-03-25
* Fix: Do not access `MethodHandles.Lookup` on Android API 24 and 25. The class is only available
on Android API 26 and higher.
## [2.8.0] - 2020-03-23
* New: Add `Call.timeout()` which returns the `okio.Timeout` of the full call.
* Fix: Change `Call.awaitResponse()` to accept a nullable response type.
* Fix: Support default methods on Java 14+. We had been working around a bug in earlier versions of
Java. That bug was fixed in Java 14, and the fix broke our workaround.
## [2.7.2] - 2020-02-24
* Fix: Update to OkHttp 3.14.7 for compatibility with Android R (API 30).
## [2.7.1] - 2020-01-02
* Fix: Support 'suspend' functions in services interfaces when using 'retrofit-mock' artifact.
## [2.7.0] - 2019-12-09
**This release changes the minimum requirements to Java 8+ or Android 5+.**
See [this blog post](https://cashapp.github.io/2019-02-05/okhttp-3-13-requires-android-5) for more information on the change.
* New: Upgrade to OkHttp 3.14.4. Please see [its changelog for 3.x](https://square.github.io/okhttp/changelog_3x/).
* Fix: Allow service interfaces to extend other interfaces.
* Fix: Ensure a non-null body is returned by `Response.error`.
## [2.6.4] - 2020-01-02
* Fix: Support 'suspend' functions in services interfaces when using 'retrofit-mock' artifact.
## [2.6.3] - 2019-12-09
* Fix: Change mechanism for avoiding `UndeclaredThrowableException` in rare cases from using `yield`
an explicit dispatch which ensures that it will work even on dispatchers which do not support yielding.
## [2.6.2] - 2019-09-23
* Fix: Avoid `IOException`s being wrapped in `UndeclaredThrowableException` in rare cases when using
`Response<..>` as a return type for Kotlin 'suspend' functions.
## [2.6.1] - 2019-07-31
* Fix: Avoid `IOException`s being wrapped in `UndeclaredThrowableException` in rare cases.
* Fix: Include no-content `ResponseBody` for responses created by `Response.error`.
* Fix: Update embedded R8/ProGuard rules to not warn about nested classes used for Kotlin extensions.
## [2.6.0] - 2019-06-05
* New: Support `suspend` modifier on functions for Kotlin! This allows you to express the asynchrony of HTTP requests
in an idiomatic fashion for the language.
```kotlin
@GET("users/{id}")
suspend fun user(@Path("id") id: Long): User
```
Behind the scenes this behaves as if defined as `fun user(...): Call<User>` and then invoked with `Call.enqueue`.
You can also return `Response<User>` for access to the response metadata.
Currently this integration only supports non-null response body types. Follow
[issue 3075](https://github.com/square/retrofit/issues/3075) for nullable type support.
* New: **`@Tag`** parameter annotation for setting tags on the underlying OkHttp `Request` object. These can be read
in `CallAdapter`s or OkHttp `Interceptor`s for tracing, analytics, varying behavior, and more.
* New: **`@SkipCallbackExecutor`** method annotation will result in your `Call` invoking its `Callback` on the
background thread on which the HTTP call was made.
* New: Support OkHttp's `Headers` type for `@HeaderMap` parameters.
* New: Add `Retrofit.Builder.baseUrl(URL)` overload.
* Fix: Add embedded R8/ProGuard rule which retains Retrofit interfaces (while still allowing obfuscation). This
is needed because R8 running in 'full mode' (i.e., not in ProGuard-compatibility mode) will see that there are
no subtypes of these interfaces and rewrite any code which references instances to null.
* Fix: Mark `HttpException.response()` as `@Nullable` as serializing the exception does not retain this instance.
* Fix: Fatal errors (such as stack overflows, out of memory, etc.) now propagate to the OkHttp `Dispatcher` thread
on which they are running.
* Fix: Ensure JAX-B converter closes the response body when an exception is thrown during deserialization.
* Fix: Ignore static methods when performing eager validation of interface methods.
* Fix: Ensure that calling `source()` twice on the `ResponseBody` passed to a `Converter` always returns the same
instance. Prior to the fix, intermediate buffering would cause response data to be lost.
## [2.5.0] - 2018-11-18
* New: Built-in support for Kotlin's `Unit` type. This behaves the same as Java's `Void` where the body
content is ignored and immediately discarded.
* New: Built-in support for Java 8's `Optional` and `CompletableFuture` types. Previously the 'converter-java8'
and 'adapter-java8' dependencies were needed and explicitly adding `Java8OptionalConverterFactory` and/or
`Java8CallAdapterFactory` to your `Retrofit.Builder` in order to use these types. Support is now built-in and
those types and their artifacts are marked as deprecated.
* New: `Invocation` class provides a reference to the invoked method and argument list as a tag on the
underlying OkHttp `Call`. This can be accessed from an OkHttp interceptor for things like logging, analytics,
or metrics aggregation.
* New: Kotlin extension for `Retrofit` which allows you call `create` passing the interface type only as
a generic parameter (e.g., `retrofit.create<MyService>()`).
* New: Added `Response.success` overload which allows specifying a custom 2xx status code.
* New: Added `Calls.failure` overload which allows passing any `Throwable` subtype.
* New: Minimal R8 rules now ship inside the jar requiring no client configuration in the common case.
* Fix: Do not propagate fatal errors to the callback. They are sent to the thread's uncaught
exception handler.
* Fix: Do not enqueue/execute an otherwise useless call when the RxJava type is disposed by `onSubscribe`.
* Fix: Call `RxJavaPlugins` assembly hook when creating an RxJava 2 type.
* Fix: Ensure both the Guava and Java 8 `Optional` converters delegate properly. This ensures that converters
registered prior to the optional converter can be used for deserializing the body type.
* Fix: Prevent `@Path` values from participating in path-traversal. This ensures untrusted input passed as
a path value cannot cause you to make a request to an un-intended relative URL.
* Fix: Simple XML converter (which is deprecated) no longer wraps subtypes of `RuntimeException`
or `IOException` when it fails.
* Fix: Prevent JAXB converter from loading remote entities and DTDs.
* Fix: Correctly detect default methods in interfaces on Android (API 24+). These still do not work, but
now a correct exception will be thrown when detected.
* Fix: Report more accurate exceptions when a `@QueryName` or `@QueryMap` precedes a `@Url` parameter.
* Update OkHttp dependency to 3.12.
## [2.4.0] - 2018-03-14
* New: `Retrofit.Builder` exposes mutable lists of the added converter and call adapter factories.
* New: Call adapter added for Scala's `Future`.
* New: Converter for JAXB replaces the now-deprecated converter for Simple XML Framework.
* New: Add Java 9 automatic module names for each artifact corresponding to their root package.
* Fix: Do not swallow `Error`s from callbacks (usually `OutOfMemoryError`).
* Fix: Moshi and Gson converters now assert that the full response was consumed. This prevents
hiding bugs in faulty adapters which might not have consumed the full JSON input which would
then cause failures on the next request over that connection.
* Fix: Do not conflate OkHttp `Call` cancelation with RxJava unsubscription/disposal. Prior to
this change, canceling of a `Call` would prevent a cancelation exception from propagating down
the Rx stream.
## [2.3.0] - 2017-05-13
* **Retrofit now uses `@Nullable` to annotate all possibly-null values.** We've
added a compile-time dependency on the JSR 305 annotations. This is a
[provided][maven_provided] dependency and does not need to be included in
your build configuration, `.jar` file, or `.apk`. We use
`@ParametersAreNonnullByDefault` and all parameters and return types are
never null unless explicitly annotated `@Nullable`.
**Warning: this release is source-incompatible for Kotlin users.**
Nullability was previously ambiguous and lenient but now the compiler will
enforce strict null checks.
* New: Converters added for Java 8's and Guava's `Optional` which wrap a potentially-nullable
response body. These converters still rely on normal serialization library converters for parsing
the response bytes into an object.
* New: String converters that return `null` for an `@Query` or `@Field` parameter are now skipped.
* New: The mock module's `NetworkBehavior` now throws a custom subclass of `IOException` to more
clearly indicate the exception's source.
* RxJava 1.x converter updated to 1.3.0 which stabilizes the use of `Completable`.
* Fix: Add explicit handling for `OnCompleteFailedException`, `OnErrorFailedException`, and
`OnErrorNotImplementedException` for RxJava 1.x to ensure they're correct delivered to the
plugins/hooks for handling.
* Fix: `NoSuchElementException` thrown when unsubscribing from an RxJava 1.x `Single`.
## [2.2.0] - 2017-02-21
* RxJava 2.x is now supported with a first-party 'adapter-rxjava2' artifact.
* New: `@QueryName` annotation allows creating a query parameter with no '=' separator or value.
* New: Support for messages generated by Protobuf 3.0 or newer when using the converter for Google's
protobuf.
* New: RxJava 1.x call adapter now correctly handles broken subscribers whose methods throw exceptions.
* New: Add `toString()` implementations for `Response` and `Result`.
* New: The Moshi converter factory now offers methods for enabling null serialization and lenient
parsing.
* New: Add `createAsync()` to RxJava 1.x call adapter factory which executes requests using
`Call.enqueue()` using the underlying HTTP client's asynchronous support.
* New: `NetworkBehavior` now allows setting an error percentage and returns HTTP errors when triggered.
* `HttpException` has been moved into the main artifact and should be used instead of the versions
embedded in each adapter (which have been deprecated).
* Promote the response body generic type on `CallAdapter` from the `adapt` method to the enclosing
class. This is a source-incompatible but binary-compatible change which is only relevant if you are
implementing your own `CallAdapter`s.
* Remove explicit handling of the now-defunct RoboVM platform.
* Fix: Close response on HTTP 204 and 205 to avoid resource leak.
* Fix: Reflect the canceled state of the HTTP client's `Call` in Retrofit's `Call`.
* Fix: Use supplied string converters for the `String` type on non-body parameters. This allows user
converters to handle cases such as when annotating string parameters instead of them always using
the raw string.
* Fix: Skip a UTF-8 BOM (if present) when using the converter for Moshi.
## [2.1.0] - 2016-06-15
* New: `@HeaderMap` annotation and support for supplying an arbitrary number of headers to an endpoint.
* New: `@JsonAdapter` annotations on the `@Body` parameter and on the method will be propagated to Moshi
for creating the request and response adapters, respectively.
* Fix: Honor the `Content-Type` encoding of XML responses when deserializing response bodies.
* Fix: Remove the stacktrace from fake network exceptions created from retrofit-mock's `NetworkBehavior`.
They had the potential to be misleading and look like a library issue.
* Fix: Eagerly catch malformed `Content-Type` headers supplied via `@Header` or `@Headers`.
## [2.0.2] - 2016-04-14
* New: `ProtoConverterFactory.createWithRegistry()` method accepts an extension registry to be used
when deserializing protos.
* Fix: Pass the correct `Call` instance to `Callback`'s `onResponse` and `onFailure` methods such
that calling `clone()` retains the correct threading behavior.
* Fix: Reduce the per-request allocation overhead for the RxJava call adapter.
## [2.0.1] - 2016-03-30
* New: Support OkHttp's `HttpUrl` as a `@Url` parameter type.
* New: Support iterable and array `@Part` parameters using OkHttp's `MultipartBody.Part`.
* Fix: Honor backpressure in `Observable`s created from the RxJavaCallAdapterFactory.
## [2.0.0] - 2016-03-11
Retrofit 2 is a major release focused on extensibility. The API changes are numerous but solve
shortcomings of the previous version and provide a path for future enhancement.
Because the release includes breaking API changes, we're changing the project's package name from
`retrofit` to `retrofit2`. This should make it possible for large applications and libraries to
migrate incrementally. The Maven group ID is now `com.squareup.retrofit2`. For an explanation of
this strategy, see Jake Wharton's post, [Java Interoperability Policy for Major Version
Updates](http://jakewharton.com/java-interoperability-policy-for-major-version-updates/).
* **Service methods return `Call<T>`.** This allows them to be executed synchronously or
asynchronously using the same method definition. A `Call` instance represents a single
request/response pair so it can only be used once, but you can `clone()` it for re-use.
Invoking `cancel()` will cancel in-flight requests or prevent the request from even being
performed if it has not already.
* **Multiple converters for multiple serialization formats.** API calls returning different
formats (like JSON, protocol buffers, and plain text) no longer need to be separated into
separate service interfaces. Combine them together and add multiple converters. Converters are
chosen based on the response type you declare. Gson is no longer included by default, so you will
always need to add a converter for any serialization support. OkHttp's `RequestBody` and
`ResponseBody` types can always be used without adding one, however.
* **Call adapters allow different execution mechanisms.** While `Call` is the built-in mechanism,
support for additional ones can be added similar to how different converters can be added.
RxJava's `Observable` support has moved into a separate artifact as a result, and support for
Java 8's `CompletableFuture` and Guava's `ListenableFuture` are also provided as additional
artifacts.
* **Generic response type includes HTTP information and deserialized body.** You no longer have to
choose between the deserialized body and reading HTTP information. Every `Call` automatically
receives both via the `Response<T>` type and the RxJava, Guava, and Java 8 call adapters also
support it.
* **@Url for hypermedia-like APIs.** When your API returns links for pagination, additional
resources, or updated content they can now be used with a service method whose first parameter
is annotated with `@Url`.
Changes from beta 4:
* New: `RxJavaCallAdapterFactory` now supports service methods which return `Completable` which
ignores and discards response bodies, if any.
* New: `RxJavaCallAdapterFactory` supports supplying a default `Scheduler` which will be used
for `subscribeOn` on returned `Observable`, `Single`, and `Completable` instances.
* New: `MoshiConverterFactory` supports creating an instance which uses lenient parsing.
* New: `@Part` can omit the part name and use OkHttp's `MultipartBody.Part` type for supplying
parts. This lets you customize the headers, name, and filename and provide the part body in a
single argument.
* The `BaseUrl` interface and support for changeable base URLs was removed. This functionality
can be done using an OkHttp interceptor and a sample showcasing it was added.
* `Response.isSuccess()` was renamed to `Response.isSuccessful()` for parity with the name of
OkHttp's version of that method.
* Fix: Throw a more appropriate exception with a message when a resolved url (base URL + relative
URL) is malformed.
* Fix: `GsonConverterFactory` now honors settings on the `Gson` instance (like leniency).
* Fix: `ScalarsConverterFactory` now supports primitive scalar types in addition to boxed for
response body parsing.
* Fix: `Retrofit.callbackExecutor()` may now return an executor even when one was not explicitly
provided. This allows custom `CallAdapter.Factory` implementations to use it when triggering
callbacks to ensure they happen on the appropriate thread for the platform (e.g., Android).
## [2.0.0-beta4] - 2016-02-04
* New: `Call` instance is now passed to both `onResponse` and `onFailure` methods of `Callback`. This aids
in detecting when `onFailure` is called as a result of `Call.cancel()` by checking `Call.isCanceled()`.
* New: `Call.request()` returns (optionally creating) the `Request` object for the call. Note: If this is
called before `Call.execute()` or `Call.enqueue()` this will do relatively expensive work synchronously.
Doing so in performance-critical sections (like on the Android main thread) should be avoided.
* New: Support for the release version of OkHttp 3.0 and newer.
* New: `adapter-guava` module provides a `CallAdapter.Factory` for Guava's `ListenableFuture`.
* New: `adapter-java8` module provides a `CallAdapter.Factory` for Java 8's `CompleteableFuture`.
* New: `ScalarsConverterFactory` (from `converter-scalars` module) now supports parsing response bodies
into either `String`, the 8 primitive types, or the 8 boxed primitive types.
* New: Automatic support for sending callbacks to the iOS main thread when running via RoboVM.
* New: Method annotations are now passed to the factory for request body converters. This allows converters
to alter the structure of both request bodies and response bodies with a single method-level annotation.
* Each converter has been moved to its own package under `retrofit2.converter.<name>`. This prevents type
collisions when many converters are simultaneously in use.
* Fix: Exceptions thrown when unable to locate a `CallAdapter.Factory` for a method return type now
correctly list the `CallAdapter.Factory` instances checked.
* Fix: Ensure default methods on service interfaces can be invoked.
* Fix: Correctly resolve the generic parameter types of collection interfaces when subclasses of those
collections are used as method parameters.
* Fix: Do not encode `/` characters in `@Path` replacements when `encoded = true`.
## [2.0.0-beta3] - 2016-01-05
* New: All classes have been migrated to the `retrofit2.*` package name. The Maven groupId is now
`com.squareup.retrofit2`. This is in accordance with the
[Java Interoperability Policy for Major Version Updates](http://jakewharton.com/java-interoperability-policy-for-major-version-updates/).
With this change Retrofit 2.x can coexiest with Retrofit 1.x in the same project.
* New: Update to use the OkHttp 3 API and OkHttp 3.0.0-RC1 or newer is now required. Similar to the previous
point, OkHttp has a new package name (`okhttp3.*`) and Maven groupId (`com.squareup.okhttp3`) which allow
it to coexist with OkHttp 2.x in the same project.
* New: String converters allow for custom serialization of parameters that end up as strings (such as `@Path`,
`@Query`, `@Header`, etc.). `Converter.Factory` has a new `stringConverter` method which receives the
parameter type and annotations and can return a converter for that type. This allows providing custom
rendering of types like `Date`, `User`, etc. to a string before being used for its purpose. A default
converter will call `toString()` for any type which retains the mimics the previous behavior.
* New: OkHttp's `Call.Factory` type is now used as the HTTP client rather than using the `OkHttpClient` type
directly (`OkHttpClient` does implement `Call.Factory`). A `callFactory` method has been added to both
`Retrofit.Builder` and `Retrofit` to allow supplying alternate implementations of an HTTP client. The
`client(OkHttpClient)` method on `Retrofit.Builder` still exists as a convenience.
* New: `isExecuted()` method returns whether a `Call` has been synchronously or asynchronously executed.
* New: `isCanceled()` method returns whether a `Call` has been canceled. Use this in `onFailure` to determine
whether the callback was invoked from cancellation or actual transport failure.
* New: `converter-scalars` module provides a `Converter.Factory` for converting `String`, the 8 primitive
types, and the 8 boxed primitive types as `text/plain` bodies. Install this before your normal converter
to avoid passing these simple scalars through, for example, a JSON converter.
* New: `Converter.Factory` methods now receive a `Retrofit` instance which also now has methods for querying
the next converter for a given type. This allows implementations to delegate to others and provide
additional behavior without complete reimplementation.
* New: `@OPTIONS` annotation more easily allows for making OPTIONS requests.
* New: `@Part` annotation now supports `List` and array types.
* New: The `@Url` annotation now allows using `java.net.URI` or `android.net.Uri` (in addition to `String`)
as parameter types for providing relative or absolute endpoint URLs dynamically.
* New: The `retrofit-mock` module has been rewritten with a new `BehaviorDelegate` class for implementing
fake network behavior in a local mock implementation of your service endpoints. Documentation and more
tests are forthcoming, but the `SimpleMockService` demonstrates its use for now.
* Fix: Forbid Retrofit's `Response` type and OkHttp's `Response` type as the response body type given to
a `Call` (i.e., `Call<Response>`). OkHttp's `ResponseBody` type is the correct one to use when the raw
body contents are desired.
* Fix: The Gson converter now respects settings on the supplied `Gson` instance (such as `serializeNulls`).
This requires Gson 2.4 or newer.
* The Wire converter has been updated to the Wire 2.0 API.
* The change in 2.0.0-beta2 which provided the `Retrofit` instance to the `onResponse` callback of `Callback`
has been reverted. There are too many edge cases around providing the `Retrofit` object in order to allow
deserialization of the error body. To accommodate this use case, pass around the `Retrofit` response
manually or implement a custom `CallAdapter.Factory` does so automatically.
## [2.0.0-beta2] - 2015-09-28
* New: Using a response type of `Void` (e.g., `Call<Void>`) will ignore and discard the response body. This
can be used when there will be no response body (such as in a 201 response) or whenever the body is not
needed. `@Head` requests are now forced to use this as their response type.
* New: `validateEagerly()` method on `Retrofit.Builder` will verify the correctness of all service methods
on calls to `create()` instead of lazily validating on first use.
* New: `Converter` is now parameterized over both 'from' and 'to' types with a single `convert` method.
`Converter.Factory` is now an abstract class and has factory methods for both request body and response
body.
* New: `Converter.Factory` and `CallAdapter.Factory` now receive the method annotations when being created
for a return/response type and the parameter annotations when being created for a parameter type.
* New: `callAdapter()` method on `Retrofit` allows querying a `CallAdapter` for a given type. The
`nextCallAdapter()` method allows delegating to another `CallAdapter` from within a `CallAdapter.Factory`.
This is useful for composing call adapters to incrementally build up behavior.
* New: `requestConverter()` and `responseConverter()` methods on `Retrofit` allow querying a `Converter` for
a given type.
* New: `onResponse` method in `Callback` now receives the `Retrofit` instance. Combined with the
`responseConverter()` method on `Retrofit`, this provides a way of deserializing an error body on `Response`.
See the `DeserializeErrorBody` sample for an example.
* New: The `MoshiConverterFactory` has been updated for its v1.0.0.
* Fix: Using `ResponseBody` for the response type or `RequestBody` for a parameter type is now correctly
identified. Previously these types would erroneously be passed to the supplied converter.
* Fix: The encoding of `@Path` values has been corrected to conform to OkHttp's `HttpUrl`.
* Fix: Use form-data content disposition subtype for `@Multipart`.
* Fix: `Observable` and `Single`-based execution of requests now behave synchronously (and thus requires
`subscribeOn()` for running in the background).
* Fix: Correct `GsonConverterFactory` to honor the configuration of the `Gson` instances (such as not
serializing null values, the default).
## [2.0.0-beta1] - 2015-08-27
* New: `Call` encapsulates a single request/response HTTP call. A call can by run synchronously
via `execute()` or asynchronously via `enqueue()` and can be canceled with `cancel()`.
* New: `Response` is now parameterized and includes the deserialized body object.
* New: `@Url` parameter annotation allows passing a complete URL for an endpoint.
* New: OkHttp is now required as a dependency. Types like `TypedInput` and `TypedOutput` (and its
implementations), `Request`, and `Header` have been replaced with OkHttp types like `RequestBody`,
`ResponseBody`, and `Headers`.
* New: `CallAdapter` (and `Factory`) provides extension point for supporting multiple execution
mechanisms. An RxJava implementation is provided by a sibling module.
* New: `Converter` (and `Factory`) provides extension point for supporting multiple serialization
mechanisms. Gson, Jackson, Moshi, Protobuf, Wire, and SimpleXml implementations are provided by sibling
modules.
* Fix: A lot of things.
* Hello Droidcon NYC 2015!
## [1.9.0] - 2015-01-07
* Update to OkHttp 2.x's native API. If you are using OkHttp you must use version 2.0 or newer (the latest
is 2.2 at time of writing) and you no longer need to use the `okhttp-urlconnection` shim.
* New: Allow disabling Simple XML Framework's strict parsing.
* New: `@Header` now accepts a `List` or array for a type.
* New: `@Field` and `@FieldMap` now have options for enabling or disabling URL encoding of names and values.
* Fix: Remove query parameters from thread name when running background requests for asynchronous use.
## [1.8.0] - 2014-11-18
* Update to RxJava 1.0. This comes with the project's 'groupId' change from `com.netflix.rxjava` to
`io.reactivex` which is why the minor version was bumped.
## [1.7.1] - 2014-10-23
* Fix: Correctly log `null` request arguments for `HEADERS_AND_ARGS` log level.
## [1.7.0] - 2014-10-08
* New: `RetrofitError`'s `getKind()` now disambiguates the type of error represented.
* New: `HEADERS_AND_ARGS` log level displays parameters passed to method invocation along with normal
header list.
* New: `@Part` and `@PartMap` now support specifying the `Content-Transfer-Encoding` of their respective
values.
* New: `@Path`, `@Query`, and `@QueryMap` now have options for enabling or disabling URL encoding on
names (where appropriate) and values.
* `@Header` now accepts all object types, invoking `String.valueOf` when neccesary.
* Attempting to use a `@Path` replacement block (`{name}`) in a query parameter now suggested `@Query` in
the exception message.
* Fix: Correct NPE when `Content-Type` override is specified on requests without a body.
* Fix: `WireConverter` now correctly throws `ConversionException` on incorrect MIME types for parity with
`ProtoConverter`.
* Fix: Include `Content-Type` on AppEngine requests.
* Fix: Account for NPE on AppEngine when the response URL was not automatically populated in certain cases.
* Fix: `MockRestAdapter`'s RxJava support now correctly schedules work on the HTTP executor, specifically
when chaining multiple requests together.
* Experimental RxJava support updated for v0.20.
## [1.6.1] - 2014-07-02
* Fix: Add any explicitly-specified 'Content-Type' header (via annotation or param) to the request even
if there is no request body (e.g., DELETE).
* Fix: Include trailing CRLF in multi-part uploads to work around a bug in .NET MVC 4 parsing.
* Fix: Allow `null` mock exception bodies and use the success type from the declared service interface.
## [1.6.0] - 2014-06-06
* New: `@Streaming` on a `Response` type will skip buffering the body to a `byte[]` before delivering.
* When using OkHttp, version 1.6.0 or newer (including 2.0.0+) is now required.
* The absence of a response body and an empty body are now differentiated in the log messages.
* Fix: If set, the `RequestInterceptor` is now applied at the time of `Observable` subscription rather
than at the time of its creation.
* Fix: `Callback` subtypes are now supported when using `MockRestAdapter`.
* Fix: `RetrofitError` now contains a useful message indicating the reason for the failure.
* Fix: Exceptions thrown when parsing the response type of the interface are now properly propagated.
* Fix: Calling `Response#getBody` when `null` body now correctly returns instead of throwing an NPE.
* Experimental RxJava support updated for v0.19.
* The `Content-Type` and `Content-Length` headers are no longer automatically added to the header list
on the `Request` object. This reverts erroneous behavior added in v1.5.0. Custom `Client` implementations
should revert to adding these headers based on the `TypedInput` body of the `Request`.
## [1.5.1] - 2014-05-08
* New: `@PartMap` annotation accepts a `Map` of key/value pairs for multi-part.
* Fix: `MockRestAdpater` uses the `ErrorHandler` from its parent `RestAdapter`.
* Experimental RxJava support updated for v0.18 and is now lazily initialized.
## [1.5.0] - 2014-03-20
* New: Support for AppEngine's [URL Fetch](https://developers.google.com/appengine/docs/java/urlfetch/)
HTTP client.
* New: Multipart requests of unknown length are now supported.
* New: HTTP `Content-Type` can be overridden with a method-level or paramter header annotation.
* New: Exceptions from malformed interface methods now include detailed information.
* Fix: Support empty HTTP response status reason.
* If an `ErrorHandler` is supplied it will be invoked for `Callback` and `Observable` methods.
* HTTP `PATCH` method using `HttpUrlConnection` is no longer supported. Add the
[OkHttp](https://square.github.io/okhttp) jar to your project if you need this behavior.
* Custom `Client` implementations should no longer set `Content-Type` or `Content-Length` headers
based on the `TypedInput` body of the `Request`. These headers will now be added automatically
as part of the standard `Request` header list.
## [1.4.1] - 2014-02-01
* Fix: `@QueryMap`, `@EncodedFieldMap`, and `@FieldMap` now correctly detect `Map`-based parameter
types.
## [1.4.0] - 2014-01-31
* New: `@Query` and `@EncodedQuery` now accept `List` or arrays for multiple values.
* New: `@QueryMap` and `@EncodedQueryMap` accept a `Map` of key/value pairs for query parameters.
* New: `@Field` now accepts `List` or arrays for multiple values.
* New: `@FieldMap` accepts a `Map` of name/value pairs for form URL-encoded request bodies.
* New: `Endpoint` replaces `Server` as the representation of the remote API root. The `Endpoints`
utility class contains factories methods for creating instances. `Server` and `ChangeableServer`
are now deprecated.
* `SimpleXmlConverter` and `JacksonConverter` now have a default constructor.
* `Response` now includes the URL.
* Fix: Hide references to optional classes to prevent over-eager class verifiers from
complaining (e.g., Dalvik).
* Fix: Properly detect and reject interfaces which extend from other interfaces.
## [1.3.0] - 2013-11-25
* New: Converter module for SimpleXML.
* New: Mock module which allows simulating real network behavior for local service interface
implementations. See 'mock-github-client' example for a demo.
* New: RxJava `Observable` support! Declare a return type of `Observable<Foo>` on your service
interfaces to automatically get an observable for that request. (Experimental API)
* Fix: Use `ObjectMapper`'s type factory when deserializing (Jackson converter).
* Multipart POST requests now stream their individual part bodies.
* Log chunking to 4000 characters now only happens on the Android platform.
## [1.2.2] - 2013-09-12
* Fix: Respect connection and read timeouts on supplied `OkHttpClient` instances.
* Fix: Ensure connection is closed on non-200 responses.
## [1.2.1] - 2013-08-30
* New: Converter for [Wire protocol buffers](https://github.com/square/wire)!
## [1.2.0] - 2013-08-23
* New: Additional first-party converters for Jackson and Protocol Buffers! These are provided
as separate modules that you can include and pass to `RestAdapter.Builder`'s `setConverter`.
* New: `@EncodedPath` and `@EncodedQuery` annotations allow provided path and query params that
are already URL-encoded.
* New: `@PATCH` HTTP method annotation.
* Fix: Properly support custom HTTP method annotations in `UrlConnectionClient`.
* Fix: Apply `RequestInterceptor` during method invocation rather than at request execution time.
* Change `setDebug` to `setLogLevel` on `RestAdapter` and `RestAdapter.Builder` and provide
two levels of logging via `LogLevel`.
* Query parameters can now be added in a request interceptor.
## [1.1.1] - 2013-06-25
* Fix: Ensure `@Headers`-defined headers are correctly added to requests.
* Fix: Supply reasonable connection and read timeouts for default clients.
* Fix: Allow passing `null` for a `@Part`-annotated argument to remove it from the multipart
request body.
## [1.1.0] - 2013-06-20
* Introduce `RequestInterceptor` to replace `RequestHeaders`. An interceptor provided to the
`RestAdapter.Builder` will be called for every request and allow setting both headers and
additional path parameter replacements.
* Add `ErrorHandler` for customizing the exceptions which are thrown when synchronous methods
return non-200 error codes.
* Properly parse responses which erroneously omit the "Content-Type" header.
## [1.0.2] - 2013-05-23
* Allow uppercase letters in path replacement identifiers.
* Fix: Static query parameters in the URL are now correctly appended with a separating '?'.
* Fix: Explicitly allow or forbid `null` as a value for method parameters.
* `@Path` - Forbidden
* `@Query` - Allowed
* `@Field` - Allowed
* `@Part` - Forbidden
* `@Body` - Forbidden
* `@Header` - Allowed
## [1.0.1] - 2013-05-13
* Fix: Correct bad regex behavior on Android.
## [1.0.0] - 2013-05-13
Initial release.
[2.11.0]: https://github.com/square/retrofit/releases/tag/2.11.0
[2.10.0]: https://github.com/square/retrofit/releases/tag/2.10.0
[2.9.0]: https://github.com/square/retrofit/releases/tag/2.9.0
[2.8.2]: https://github.com/square/retrofit/releases/tag/2.8.2
[2.8.1]: https://github.com/square/retrofit/releases/tag/parent-2.8.1
[2.8.0]: https://github.com/square/retrofit/releases/tag/parent-2.8.0
[2.7.2]: https://github.com/square/retrofit/releases/tag/parent-2.7.2
[2.7.1]: https://github.com/square/retrofit/releases/tag/parent-2.7.1
[2.7.0]: https://github.com/square/retrofit/releases/tag/parent-2.7.0
[2.6.4]: https://github.com/square/retrofit/releases/tag/parent-2.6.4
[2.6.3]: https://github.com/square/retrofit/releases/tag/parent-2.6.3
[2.6.2]: https://github.com/square/retrofit/releases/tag/parent-2.6.2
[2.6.1]: https://github.com/square/retrofit/releases/tag/parent-2.6.1
[2.6.0]: https://github.com/square/retrofit/releases/tag/parent-2.6.0
[2.5.0]: https://github.com/square/retrofit/releases/tag/parent-2.5.0
[2.4.0]: https://github.com/square/retrofit/releases/tag/parent-2.4.0
[2.3.0]: https://github.com/square/retrofit/releases/tag/parent-2.3.0
[2.2.0]: https://github.com/square/retrofit/releases/tag/parent-2.2.0
[2.1.0]: https://github.com/square/retrofit/releases/tag/parent-2.1.0
[2.0.2]: https://github.com/square/retrofit/releases/tag/parent-2.0.2
[2.0.1]: https://github.com/square/retrofit/releases/tag/parent-2.0.1
[2.0.0]: https://github.com/square/retrofit/releases/tag/parent-2.0.0
[2.0.0-beta4]: https://github.com/square/retrofit/releases/tag/parent-2.0.0-beta4
[2.0.0-beta3]: https://github.com/square/retrofit/releases/tag/parent-2.0.0-beta3
[2.0.0-beta2]: https://github.com/square/retrofit/releases/tag/parent-2.0.0-beta2
[2.0.0-beta1]: https://github.com/square/retrofit/releases/tag/parent-2.0.0-beta1
[1.9.0]: https://github.com/square/retrofit/releases/tag/parent-1.9.0
[1.8.0]: https://github.com/square/retrofit/releases/tag/parent-1.8.0
[1.7.1]: https://github.com/square/retrofit/releases/tag/parent-1.7.1
[1.7.0]: https://github.com/square/retrofit/releases/tag/parent-1.7.0
[1.6.1]: https://github.com/square/retrofit/releases/tag/parent-1.6.1
[1.6.0]: https://github.com/square/retrofit/releases/tag/parent-1.6.0
[1.5.1]: https://github.com/square/retrofit/releases/tag/parent-1.5.1
[1.5.0]: https://github.com/square/retrofit/releases/tag/parent-1.5.0
[1.4.1]: https://github.com/square/retrofit/releases/tag/parent-1.4.1
[1.4.0]: https://github.com/square/retrofit/releases/tag/parent-1.4.0
[1.3.0]: https://github.com/square/retrofit/releases/tag/parent-1.3.0
[1.2.2]: https://github.com/square/retrofit/releases/tag/parent-1.2.2
[1.2.1]: https://github.com/square/retrofit/releases/tag/parent-1.2.1
[1.2.0]: https://github.com/square/retrofit/releases/tag/parent-1.2.0
[1.1.1]: https://github.com/square/retrofit/releases/tag/parent-1.1.1
[1.1.0]: https://github.com/square/retrofit/releases/tag/parent-1.1.0
[1.0.2]: https://github.com/square/retrofit/releases/tag/parent-1.0.2
[1.0.1]: https://github.com/square/retrofit/releases/tag/parent-1.0.1
[1.0.0]: https://github.com/square/retrofit/releases/tag/parent-1.0.0
[maven_provided]: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
================================================
FILE: LICENSE.txt
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
Retrofit
========
A type-safe HTTP client for Android and Java.
For more information please see [the website][1].
Download
--------
Download [the latest JAR][2] or grab from Maven central at the coordinates `com.squareup.retrofit2:retrofit:3.0.0`.
Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].
Retrofit requires at minimum Java 8+ or Android API 21+.
R8 / ProGuard
-------------
If you are using R8 the shrinking and obfuscation rules are included automatically.
ProGuard users must manually add the options from
[retrofit2.pro][proguard file].
You might also need [rules for OkHttp][okhttp proguard] which is a dependency of this library.
License
=======
Copyright 2013 Square, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
[1]: https://square.github.io/retrofit/
[2]: https://search.maven.org/remote_content?g=com.squareup.retrofit2&a=retrofit&v=LATEST
[snap]: https://s01.oss.sonatype.org/content/repositories/snapshots/
[proguard file]: https://github.com/square/retrofit/blob/master/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro
[okhttp proguard]: https://square.github.io/okhttp/r8_proguard/
[okio proguard]: https://square.github.io/okio/#r8-proguard
================================================
FILE: RELEASING.md
================================================
# Releasing
1. Update the `VERSION_NAME` in `gradle.properties` to the release version.
2. Update the `CHANGELOG.md`:
1. Change the `Unreleased` header to the release version.
2. Add a link URL to ensure the header link works.
3. Add a new `Unreleased` section to the top.
3. Update the `README.md` so the "Download" section reflects the new release version.
4. Commit
```
$ git commit -am "Prepare version X.Y.Z"
```
5. Tag
```
$ git tag -am "Version X.Y.Z" X.Y.Z
```
6. Update the `VERSION_NAME` in `gradle.properties` to the next "SNAPSHOT" version.
7. Commit
```
$ git commit -am "Prepare next development version"
```
8. Push!
```
$ git push && git push --tags
```
This will trigger a GitHub Action workflow which will create a GitHub release and upload the
release artifacts to Maven Central.
================================================
FILE: build.gradle
================================================
import net.ltgt.gradle.errorprone.CheckSeverity
buildscript {
dependencies {
classpath libs.androidPlugin
classpath libs.kotlin.gradlePlugin
classpath libs.kotlin.serializationPlugin
classpath libs.dokkaPlugin
classpath libs.gradleMavenPublishPlugin
classpath libs.spotlessPlugin
classpath libs.errorpronePlugin
classpath libs.animalSnifferPlugin
classpath libs.protobufPlugin
}
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
}
subprojects {
tasks.withType(JavaCompile).configureEach { task ->
task.options.encoding = 'UTF-8'
}
plugins.withType(JavaBasePlugin).configureEach {
java.toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
tasks.withType(Test).configureEach {
testLogging {
if (System.getenv("CI") == "true") {
events = ["failed", "skipped", "passed"]
}
exceptionFormat "full"
}
}
apply plugin: 'net.ltgt.errorprone'
dependencies {
errorproneJavac libs.errorproneJavac
errorprone libs.errorproneCore
}
tasks.withType(JavaCompile).configureEach { task ->
task.options.errorprone {
excludedPaths = '.*/build/generated/sources/proto/.*'
check('MissingFail', CheckSeverity.ERROR)
check('MissingOverride', CheckSeverity.ERROR)
check('UnusedException', CheckSeverity.ERROR)
check('UnusedMethod', CheckSeverity.ERROR)
check('UnusedNestedClass', CheckSeverity.ERROR)
check('UnusedVariable', CheckSeverity.ERROR)
check('WildcardImport', CheckSeverity.ERROR)
}
}
plugins.withId('java-library') {
project.apply plugin: 'ru.vyarus.animalsniffer'
animalsniffer {
sourceSets = [sourceSets.main] // Only check main sources, ignore test code.
}
dependencies {
signature 'org.codehaus.mojo.signature:java18:1.0@signature'
if (project.path != ':retrofit-converters:java8' &&
project.path != ':retrofit-converters:jaxb' &&
project.path != ':retrofit-converters:jaxb3' &&
project.path != ':retrofit-adapters:java8') {
signature 'net.sf.androidscents.signature:android-api-level-21:5.0.1_r2@signature'
}
}
plugins.apply('com.diffplug.spotless')
spotless {
java {
googleJavaFormat(libs.googleJavaFormat.get().version)
.formatJavadoc(false)
removeUnusedImports()
target 'src/*/java*/**/*.java'
}
kotlin {
ktfmt(libs.ktfmt.get().version).googleStyle()
target 'src/**/*.kt'
}
}
}
}
tasks.register('clean', Delete) {
delete = layout.buildDirectory
}
tasks.register('copyWebsiteDocs', Copy) {
description = 'Copies generated documentation to the website'
group = JavaBasePlugin.DOCUMENTATION_GROUP
into layout.projectDirectory.dir('website/public/3.x')
subprojects { subproject ->
if (subproject.name == 'retrofit-bom') return
if (!subproject.plugins.hasPlugin('com.vanniktech.maven.publish')) return
into(subproject.POM_ARTIFACT_ID) {
if (subproject.plugins.hasPlugin('org.jetbrains.dokka')) {
from subproject.tasks.named('dokkaGeneratePublicationHtml').flatMap { it.outputDirectory }
} else {
from subproject.tasks.named('javadoc').map { it.destinationDir }
}
}
}
}
================================================
FILE: gradle/libs.versions.toml
================================================
# Copyright (C) 2021 Square, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[versions]
kotlin = "2.3.10"
okhttp = "5.3.2"
protobuf = "3.25.8"
robovm = "2.3.14"
kotlinx-serialization = "1.10.0"
autoService = "1.1.1"
incap = "1.0.0"
jackson = "2.21.1"
[libraries]
androidPlugin = "com.android.tools.build:gradle:9.1.0"
robovmPlugin = { module = "com.mobidevelop.robovm:robovm-gradle-plugin", version.ref = "robovm" }
dokkaPlugin = "org.jetbrains.dokka:dokka-gradle-plugin:2.1.0"
gradleMavenPublishPlugin = "com.vanniktech:gradle-maven-publish-plugin:0.36.0"
spotlessPlugin = "com.diffplug.spotless:spotless-plugin-gradle:8.3.0"
kotlin-stdLib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-serializationPlugin = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
errorpronePlugin = "net.ltgt.gradle:gradle-errorprone-plugin:4.4.0"
errorproneCore = { module = "com.google.errorprone:error_prone_core", version = "2.10.0" }
errorproneJavac = { module = "com.google.errorprone:javac", version = "9+181-r4173-1" }
animalSnifferPlugin = "ru.vyarus:gradle-animalsniffer-plugin:2.0.1"
animalSnifferAnnotations = { module = "org.codehaus.mojo:animal-sniffer-annotations", version = "1.27" }
protobufPlugin = "com.google.protobuf:protobuf-gradle-plugin:0.9.6"
protobuf = { module = "com.google.protobuf:protobuf-java", version.ref = "protobuf" }
protoc = { module = "com.google.protobuf:protoc", version.ref = "protobuf" }
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.10.2" }
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinx-serialization" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
kotlinx-serialization-proto = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version.ref = "kotlinx-serialization" }
okhttp-client = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
okhttp-loggingInterceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" }
okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" }
junit = { module = "junit:junit", version = "4.13.2" }
truth = "com.google.truth:truth:1.4.5"
guava = { module = "com.google.guava:guava", version = "33.5.0-jre" }
android = { module = "com.google.android:android", version = "4.1.1.4" }
findBugsAnnotations = { module = "com.google.code.findbugs:jsr305", version = "3.0.2" }
androidxTestRunner = { module = "androidx.test:runner", version = "1.4.0" }
rxjava = { module = "io.reactivex:rxjava", version = "1.3.8" }
rxjava2 = { module = "io.reactivex.rxjava2:rxjava", version = "2.2.21" }
rxjava3 = { module = "io.reactivex.rxjava3:rxjava", version = "3.1.12" }
reactiveStreams = { module = "org.reactivestreams:reactive-streams", version = "1.0.4" }
scalaLibrary = { module = "org.scala-lang:scala-library", version = "2.13.18" }
gson = { module = "com.google.code.gson:gson", version = "2.13.2" }
jacksonDatabind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jackson" }
jacksonDataformatCbor = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor", version.ref = "jackson" }
jaxbApi = { module = "javax.xml.bind:jaxb-api", version = "2.3.1" }
jaxbImpl = { module = "org.glassfish.jaxb:jaxb-runtime", version = "4.0.7" }
jaxb3Api = { module = "jakarta.xml.bind:jakarta.xml.bind-api", version = "3.0.1" }
jaxb3Impl = { module = "com.sun.xml.bind:jaxb-impl", version = "3.0.2" }
moshi = { module = "com.squareup.moshi:moshi", version = "1.15.2" }
simpleXml = { module = "org.simpleframework:simple-xml", version = "2.7.1" }
wireRuntime = { module = "com.squareup.wire:wire-runtime", version = "5.5.1" }
jsoup = { module = "org.jsoup:jsoup", version = "1.22.1" }
robovm = { module = "com.mobidevelop.robovm:robovm-rt", version.ref = "robovm" }
googleJavaFormat = "com.google.googlejavaformat:google-java-format:1.35.0"
ktfmt = "com.facebook:ktfmt:0.61"
compileTesting = "com.google.testing.compile:compile-testing:0.23.0"
testParameterInjector = "com.google.testparameterinjector:test-parameter-injector:1.21"
================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
================================================
FILE: gradle.properties
================================================
GROUP=com.squareup.retrofit2
VERSION_NAME=3.1.0-SNAPSHOT
POM_URL=https://github.com/square/retrofit
POM_SCM_URL=https://github.com/square/retrofit/
POM_SCM_CONNECTION=scm:git:git://github.com/square/retrofit.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/square/retrofit.git
POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=square
POM_DEVELOPER_NAME=Square, Inc.
# Publishing SHA 256 and 512 hashes of maven-metadata is not supported by Sonatype and Nexus.
# See https://github.com/gradle/gradle/issues/11308 and https://issues.sonatype.org/browse/NEXUS-21802
systemProp.org.gradle.internal.publish.checksums.insecure=true
android.useAndroidX=true
mavenCentralPublishing=true
mavenCentralAutomaticPublishing=true
signAllPublications=true
================================================
FILE: gradlew
================================================
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
================================================
FILE: gradlew.bat
================================================
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
================================================
FILE: retrofit/android-test/build.gradle
================================================
apply plugin: 'com.android.library'
android {
compileSdk = 36
namespace 'retrofit2.android'
defaultConfig {
minSdk = 21
// We need to disable D8 desugaring of default methods for the default method tests to work
// correctly. This works in Android Studio because it sets the minSdk automatically based on
// your deployment target. This environment variable is set by the GitHub Action.
def emulatorApiLevel = System.getenv("API_LEVEL")
if (emulatorApiLevel != null) {
try {
minSdk = Integer.parseInt(emulatorApiLevel)
} catch (NumberFormatException ignored) {
}
}
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'retrofit'
keyAlias 'retrofit'
keyPassword 'retrofit'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
}
}
dependencies {
androidTestImplementation projects.retrofit
androidTestImplementation projects.retrofit.testHelpers
androidTestImplementation libs.junit
androidTestImplementation libs.truth
androidTestImplementation libs.okhttp.mockwebserver
androidTestImplementation libs.androidxTestRunner
}
================================================
FILE: retrofit/android-test/src/androidTest/java/retrofit2/BasicCallTest.java
================================================
/*
* Copyright (C) 2020 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import java.io.IOException;
import okhttp3.ResponseBody;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.Rule;
import org.junit.Test;
import retrofit2.http.GET;
import static org.junit.Assert.assertEquals;
public final class BasicCallTest {
@Rule public final MockWebServer server = new MockWebServer();
interface Service {
@GET("/") Call<ResponseBody> getBody();
}
@Test public void responseBody() throws IOException {
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(server.url("/"))
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody("1234"));
Response<ResponseBody> response = example.getBody().execute();
assertEquals("1234", response.body().string());
}
}
================================================
FILE: retrofit/android-test/src/androidTest/java/retrofit2/CompletableFutureAndroidTest.java
================================================
/*
* Copyright (C) 2016 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import androidx.test.filters.SdkSuppress;
import java.util.concurrent.CompletableFuture;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import retrofit2.helpers.ToStringConverterFactory;
import retrofit2.http.GET;
import static com.google.common.truth.Truth.assertThat;
@SdkSuppress(minSdkVersion = 24)
public final class CompletableFutureAndroidTest {
@Rule public final MockWebServer server = new MockWebServer();
interface Service {
@GET("/")
CompletableFuture<String> endpoint();
}
private Service service;
@Before
public void setUp() {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
service = retrofit.create(Service.class);
}
@Test
public void completableFutureApi24() throws Exception {
server.enqueue(new MockResponse().setBody("Hi"));
CompletableFuture<String> future = service.endpoint();
assertThat(future.get()).isEqualTo("Hi");
}
}
================================================
FILE: retrofit/android-test/src/androidTest/java/retrofit2/DefaultMethodsAndroidTest.java
================================================
/*
* Copyright (C) 2016 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import androidx.test.filters.SdkSuppress;
import java.io.IOException;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.Rule;
import org.junit.Test;
import retrofit2.helpers.ToStringConverterFactory;
import retrofit2.http.GET;
import retrofit2.http.Query;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.fail;
public final class DefaultMethodsAndroidTest {
@Rule public final MockWebServer server = new MockWebServer();
interface Example {
@GET("/")
Call<String> user(@Query("name") String name);
default Call<String> user() {
return user("hey");
}
}
@Test
@SdkSuppress(minSdkVersion = 24, maxSdkVersion = 25)
public void failsOnApi24And25() {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Example example = retrofit.create(Example.class);
try {
example.user();
fail();
} catch (UnsupportedOperationException e) {
assertThat(e).hasMessageThat().isEqualTo("Calling default methods on API 24 and 25 is not supported");
}
}
@Test
@SdkSuppress(minSdkVersion = 26)
public void doesNotFailOnApi26() throws IOException, InterruptedException {
server.enqueue(new MockResponse());
server.enqueue(new MockResponse());
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Example example = retrofit.create(Example.class);
example.user().execute();
assertThat(server.takeRequest().getRequestUrl().queryParameter("name")).isEqualTo("hey");
example.user("hi").execute();
assertThat(server.takeRequest().getRequestUrl().queryParameter("name")).isEqualTo("hi");
}
}
================================================
FILE: retrofit/android-test/src/androidTest/java/retrofit2/OptionalConverterFactoryAndroidTest.java
================================================
/*
* Copyright (C) 2017 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import androidx.test.filters.SdkSuppress;
import java.io.IOException;
import java.util.Optional;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import retrofit2.helpers.ObjectInstanceConverterFactory;
import retrofit2.http.GET;
import static com.google.common.truth.Truth.assertThat;
@SdkSuppress(minSdkVersion = 24)
public final class OptionalConverterFactoryAndroidTest {
interface Service {
@GET("/")
Call<Optional<Object>> optional();
@GET("/")
Call<Object> object();
}
@Rule public final MockWebServer server = new MockWebServer();
private Service service;
@Before
public void setUp() {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ObjectInstanceConverterFactory())
.build();
service = retrofit.create(Service.class);
}
@Test
public void optionalApi24() throws IOException {
server.enqueue(new MockResponse());
Optional<Object> optional = service.optional().execute().body();
assertThat(optional.get()).isSameInstanceAs(ObjectInstanceConverterFactory.VALUE);
}
@Test
public void onlyMatchesOptional() throws IOException {
server.enqueue(new MockResponse());
Object body = service.object().execute().body();
assertThat(body).isSameInstanceAs(ObjectInstanceConverterFactory.VALUE);
}
}
================================================
FILE: retrofit/android-test/src/androidTest/java/retrofit2/UriAndroidTest.java
================================================
/*
* Copyright (C) 2015 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import android.net.Uri;
import java.io.IOException;
import okhttp3.HttpUrl;
import okhttp3.ResponseBody;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import retrofit2.http.GET;
import retrofit2.http.Url;
import static com.google.common.truth.Truth.assertThat;
public final class UriAndroidTest {
@Rule public final MockWebServer server1 = new MockWebServer();
@Rule public final MockWebServer server2 = new MockWebServer();
interface Service {
@GET
Call<ResponseBody> method(@Url Uri url);
}
private Service service;
@Before
public void setUp() {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server1.url("/"))
.build();
service = retrofit.create(Service.class);
}
@Test
public void getWithAndroidUriUrl() throws IOException, InterruptedException {
server1.enqueue(new MockResponse().setBody("Hi"));
service.method(Uri.parse("foo/bar/")).execute();
assertThat(server1.takeRequest().getRequestUrl()).isEqualTo(server1.url("foo/bar/"));
}
@Test
public void getWithAndroidUriUrlAbsolute() throws IOException, InterruptedException {
server2.enqueue(new MockResponse().setBody("Hi"));
HttpUrl url = server2.url("/");
service.method(Uri.parse(url.toString())).execute();
assertThat(server2.takeRequest().getRequestUrl()).isEqualTo(url);
}
}
================================================
FILE: retrofit/android-test/src/main/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<application android:usesCleartextTraffic="true"/>
</manifest>
================================================
FILE: retrofit/build.gradle
================================================
apply plugin: 'java-library'
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'com.vanniktech.maven.publish'
def addMultiReleaseSourceSet(int version) {
def sourceSet = sourceSets.create("java$version")
sourceSet.java.srcDir("src/main/java$version")
// Propagate dependencies to be visible to this version's source set.
configurations.getByName("java${version}Implementation").extendsFrom(configurations.getByName('implementation'))
configurations.getByName("java${version}Api").extendsFrom(configurations.getByName('api'))
configurations.getByName("java${version}CompileOnly").extendsFrom(configurations.getByName('compileOnly'))
// Allow types in the main source set to be visible to this version's source set.
dependencies.add("java${version}Implementation", sourceSets.getByName("main").output)
tasks.named("compileJava${version}Java", JavaCompile) {
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(version)
vendor = JvmVendorSpec.AZUL
}
}
tasks.named('jar', Jar) {
from(sourceSet.output) {
into("META-INF/versions/$version")
}
}
}
addMultiReleaseSourceSet(14)
addMultiReleaseSourceSet(16)
dependencies {
api libs.okhttp.client
compileOnly libs.android
compileOnly libs.kotlinx.coroutines
compileOnly libs.animalSnifferAnnotations
compileOnly libs.findBugsAnnotations
}
javadoc {
exclude('retrofit2/internal/**')
}
jar {
manifest {
attributes 'Automatic-Module-Name': 'retrofit2'
attributes 'Multi-Release': 'true'
}
}
================================================
FILE: retrofit/gradle.properties
================================================
POM_ARTIFACT_ID=retrofit
POM_NAME=Retrofit
POM_DESCRIPTION=A type-safe HTTP client for Android and Java.
================================================
FILE: retrofit/java-test/README.md
================================================
# Retrofit Java Tests
These are in a separate module for two reasons:
- It ensures optional dependencies (Kotlin stuff) are completely absent.
- It uses the multi-release jar on the classpath rather than only the classes folder.
================================================
FILE: retrofit/java-test/build.gradle
================================================
apply plugin: 'java-library'
dependencies {
testImplementation projects.retrofit
testImplementation projects.retrofit.testHelpers
testImplementation libs.findBugsAnnotations
testImplementation libs.junit
testImplementation libs.truth
testImplementation libs.guava
testImplementation libs.okhttp.mockwebserver
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << '-parameters'
}
// Create a test task for each supported JDK.
(8..24).each { majorVersion ->
def jdkTest = tasks.register("testJdk$majorVersion", Test) {
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(majorVersion)
vendor = JvmVendorSpec.AZUL
}
description = "Runs the test suite on JDK $majorVersion"
group = LifecycleBasePlugin.VERIFICATION_GROUP
// Wire directly to the test source set outputs for proper task dependencies.
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
}
tasks.named("check").configure {
dependsOn(jdkTest)
}
}
// We don't need the built-in task which uses Gradle's JVM given the above variants.
tasks.getByName('test').enabled = false
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/AnnotationArraySubject.java
================================================
package retrofit2;
import static com.google.common.truth.Fact.simpleFact;
import static com.google.common.truth.Truth.assertAbout;
import com.google.common.truth.FailureMetadata;
import com.google.common.truth.Subject;
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public final class AnnotationArraySubject extends Subject {
public static Factory<AnnotationArraySubject, Annotation[]> annotationArrays() {
return AnnotationArraySubject::new;
}
public static AnnotationArraySubject assertThat(Annotation[] actual) {
return assertAbout(annotationArrays()).that(actual);
}
private final List<Annotation> actual;
private AnnotationArraySubject(FailureMetadata metadata, Annotation[] actual) {
super(metadata, actual);
this.actual = new ArrayList<>(actual.length);
Collections.addAll(this.actual, actual);
}
public void hasAtLeastOneElementOfType(Class<? extends Annotation> cls) {
for (Annotation annotation : actual) {
if (cls.isAssignableFrom(annotation.annotationType())) {
return;
}
}
failWithActual(simpleFact("No annotations of instance " + cls));
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/CallAdapterTest.java
================================================
/*
* Copyright (C) 2016 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.fail;
import static retrofit2.CallAdapter.Factory.getParameterUpperBound;
import static retrofit2.CallAdapter.Factory.getRawType;
import com.google.common.reflect.TypeToken;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;
import java.util.Map;
import org.junit.Test;
public final class CallAdapterTest {
@Test
public void parameterizedTypeInvalidIndex() {
ParameterizedType listOfString = (ParameterizedType) new TypeToken<List<String>>() {}.getType();
try {
getParameterUpperBound(-1, listOfString);
fail();
} catch (IllegalArgumentException e) {
assertThat(e)
.hasMessageThat()
.isEqualTo("Index -1 not in range [0,1) for java.util.List<java.lang.String>");
}
try {
getParameterUpperBound(1, listOfString);
fail();
} catch (IllegalArgumentException e) {
assertThat(e)
.hasMessageThat()
.isEqualTo("Index 1 not in range [0,1) for java.util.List<java.lang.String>");
}
}
@Test
public void parameterizedTypes() {
ParameterizedType one = (ParameterizedType) new TypeToken<List<String>>() {}.getType();
assertThat(getParameterUpperBound(0, one)).isSameInstanceAs(String.class);
ParameterizedType two = (ParameterizedType) new TypeToken<Map<String, String>>() {}.getType();
assertThat(getParameterUpperBound(0, two)).isSameInstanceAs(String.class);
assertThat(getParameterUpperBound(1, two)).isSameInstanceAs(String.class);
ParameterizedType wild =
(ParameterizedType) new TypeToken<List<? extends CharSequence>>() {}.getType();
assertThat(getParameterUpperBound(0, wild)).isSameInstanceAs(CharSequence.class);
}
@Test
public void rawTypeThrowsOnNull() {
try {
getRawType(null);
fail();
} catch (NullPointerException e) {
assertThat(e).hasMessageThat().isEqualTo("type == null");
}
}
@Test
public void rawTypes() throws NoSuchMethodException {
assertThat(getRawType(String.class)).isSameInstanceAs(String.class);
Type listOfString = new TypeToken<List<String>>() {}.getType();
assertThat(getRawType(listOfString)).isSameInstanceAs(List.class);
Type stringArray = new TypeToken<String[]>() {}.getType();
assertThat(getRawType(stringArray)).isSameInstanceAs(String[].class);
Type wild =
((ParameterizedType) new TypeToken<List<? extends CharSequence>>() {}.getType())
.getActualTypeArguments()[0];
assertThat(getRawType(wild)).isSameInstanceAs(CharSequence.class);
Type wildParam =
((ParameterizedType) new TypeToken<List<? extends List<String>>>() {}.getType())
.getActualTypeArguments()[0];
assertThat(getRawType(wildParam)).isSameInstanceAs(List.class);
Type typeVar = A.class.getDeclaredMethod("method").getGenericReturnType();
assertThat(getRawType(typeVar)).isSameInstanceAs(Object.class);
}
@SuppressWarnings("unused") // Used reflectively.
static class A<T> {
T method() {
return null;
}
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/CallTest.java
================================================
/*
* Copyright (C) 2015 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import static com.google.common.truth.Truth.assertThat;
import static java.util.concurrent.TimeUnit.SECONDS;
import static okhttp3.mockwebserver.SocketPolicy.DISCONNECT_DURING_RESPONSE_BODY;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static retrofit2.TestingUtils.repeat;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import okhttp3.OkHttpClient;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.SocketPolicy;
import okio.Buffer;
import okio.BufferedSource;
import okio.ForwardingSource;
import okio.Okio;
import org.junit.Rule;
import org.junit.Test;
import retrofit2.helpers.ToStringConverterFactory;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Streaming;
public final class CallTest {
@Rule public final MockWebServer server = new MockWebServer();
interface Service {
@GET("/")
Call<String> getString();
@GET("/")
Call<ResponseBody> getBody();
@GET("/")
@Streaming
Call<ResponseBody> getStreamingBody();
@POST("/")
Call<String> postString(@Body String body);
@POST("/{a}")
Call<String> postRequestBody(@Path("a") Object a);
}
@Test
public void http200Sync() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody("Hi"));
Response<String> response = example.getString().execute();
assertThat(response.isSuccessful()).isTrue();
assertThat(response.body()).isEqualTo("Hi");
}
@Test
public void http200Async() throws InterruptedException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody("Hi"));
final AtomicReference<Response<String>> responseRef = new AtomicReference<>();
final CountDownLatch latch = new CountDownLatch(1);
example
.getString()
.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
responseRef.set(response);
latch.countDown();
}
@Override
public void onFailure(Call<String> call, Throwable t) {
t.printStackTrace();
}
});
assertTrue(latch.await(10, SECONDS));
Response<String> response = responseRef.get();
assertThat(response.isSuccessful()).isTrue();
assertThat(response.body()).isEqualTo("Hi");
}
@Test
public void http404Sync() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setResponseCode(404).setBody("Hi"));
Response<String> response = example.getString().execute();
assertThat(response.isSuccessful()).isFalse();
assertThat(response.code()).isEqualTo(404);
assertThat(response.errorBody().string()).isEqualTo("Hi");
}
@Test
public void http404Async() throws InterruptedException, IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setResponseCode(404).setBody("Hi"));
final AtomicReference<Response<String>> responseRef = new AtomicReference<>();
final CountDownLatch latch = new CountDownLatch(1);
example
.getString()
.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
responseRef.set(response);
latch.countDown();
}
@Override
public void onFailure(Call<String> call, Throwable t) {
t.printStackTrace();
}
});
assertTrue(latch.await(10, SECONDS));
Response<String> response = responseRef.get();
assertThat(response.isSuccessful()).isFalse();
assertThat(response.code()).isEqualTo(404);
assertThat(response.errorBody().string()).isEqualTo("Hi");
}
@Test
public void transportProblemSync() {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.DISCONNECT_AT_START));
Call<String> call = example.getString();
try {
call.execute();
fail();
} catch (IOException ignored) {
}
}
@Test
public void transportProblemAsync() throws InterruptedException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.DISCONNECT_AT_START));
final AtomicReference<Throwable> failureRef = new AtomicReference<>();
final CountDownLatch latch = new CountDownLatch(1);
example
.getString()
.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
throw new AssertionError();
}
@Override
public void onFailure(Call<String> call, Throwable t) {
failureRef.set(t);
latch.countDown();
}
});
assertTrue(latch.await(10, SECONDS));
Throwable failure = failureRef.get();
assertThat(failure).isInstanceOf(IOException.class);
}
@Test
public void conversionProblemOutgoingSync() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(
new ToStringConverterFactory() {
@Override
public Converter<String, RequestBody> requestBodyConverter(
Type type,
Annotation[] parameterAnnotations,
Annotation[] methodAnnotations,
Retrofit retrofit) {
return value -> {
throw new UnsupportedOperationException("I am broken!");
};
}
})
.build();
Service example = retrofit.create(Service.class);
Call<String> call = example.postString("Hi");
try {
call.execute();
fail();
} catch (UnsupportedOperationException e) {
assertThat(e).hasMessageThat().isEqualTo("I am broken!");
}
}
@Test
public void conversionProblemOutgoingAsync() throws InterruptedException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(
new ToStringConverterFactory() {
@Override
public Converter<String, RequestBody> requestBodyConverter(
Type type,
Annotation[] parameterAnnotations,
Annotation[] methodAnnotations,
Retrofit retrofit) {
return value -> {
throw new UnsupportedOperationException("I am broken!");
};
}
})
.build();
Service example = retrofit.create(Service.class);
final AtomicReference<Throwable> failureRef = new AtomicReference<>();
final CountDownLatch latch = new CountDownLatch(1);
example
.postString("Hi")
.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
throw new AssertionError();
}
@Override
public void onFailure(Call<String> call, Throwable t) {
failureRef.set(t);
latch.countDown();
}
});
assertTrue(latch.await(10, SECONDS));
Throwable failure = failureRef.get();
assertThat(failure).isInstanceOf(UnsupportedOperationException.class);
assertThat(failure).hasMessageThat().isEqualTo("I am broken!");
}
@Test
public void conversionProblemIncomingSync() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(
new ToStringConverterFactory() {
@Override
public Converter<ResponseBody, String> responseBodyConverter(
Type type, Annotation[] annotations, Retrofit retrofit) {
return value -> {
throw new UnsupportedOperationException("I am broken!");
};
}
})
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody("Hi"));
Call<String> call = example.postString("Hi");
try {
call.execute();
fail();
} catch (UnsupportedOperationException e) {
assertThat(e).hasMessageThat().isEqualTo("I am broken!");
}
}
@Test
public void conversionProblemIncomingMaskedByConverterIsUnwrapped() throws IOException {
// MWS has no way to trigger IOExceptions during the response body so use an interceptor.
OkHttpClient client =
new OkHttpClient.Builder() //
.addInterceptor(
chain -> {
okhttp3.Response response = chain.proceed(chain.request());
ResponseBody body = response.body();
BufferedSource source =
Okio.buffer(
new ForwardingSource(body.source()) {
@Override
public long read(Buffer sink, long byteCount) throws IOException {
throw new IOException("cause");
}
});
body = ResponseBody.create(body.contentType(), body.contentLength(), source);
return response.newBuilder().body(body).build();
})
.build();
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.client(client)
.addConverterFactory(
new ToStringConverterFactory() {
@Override
public Converter<ResponseBody, String> responseBodyConverter(
Type type, Annotation[] annotations, Retrofit retrofit) {
return value -> {
try {
return value.string();
} catch (IOException e) {
// Some serialization libraries mask transport problems in runtime
// exceptions. Bad!
throw new RuntimeException("wrapper", e);
}
};
}
})
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody("Hi"));
Call<String> call = example.getString();
try {
call.execute();
fail();
} catch (IOException e) {
assertThat(e).hasMessageThat().isEqualTo("cause");
}
}
@Test
public void conversionProblemIncomingAsync() throws InterruptedException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(
new ToStringConverterFactory() {
@Override
public Converter<ResponseBody, String> responseBodyConverter(
Type type, Annotation[] annotations, Retrofit retrofit) {
return value -> {
throw new UnsupportedOperationException("I am broken!");
};
}
})
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody("Hi"));
final AtomicReference<Throwable> failureRef = new AtomicReference<>();
final CountDownLatch latch = new CountDownLatch(1);
example
.postString("Hi")
.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
throw new AssertionError();
}
@Override
public void onFailure(Call<String> call, Throwable t) {
failureRef.set(t);
latch.countDown();
}
});
assertTrue(latch.await(10, SECONDS));
Throwable failure = failureRef.get();
assertThat(failure).isInstanceOf(UnsupportedOperationException.class);
assertThat(failure).hasMessageThat().isEqualTo("I am broken!");
}
@Test
public void http204SkipsConverter() throws IOException {
final Converter<ResponseBody, String> converter =
value -> {
throw new AssertionError();
};
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(
new ToStringConverterFactory() {
@Override
public Converter<ResponseBody, String> responseBodyConverter(
Type type, Annotation[] annotations, Retrofit retrofit) {
return converter;
}
})
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setStatus("HTTP/1.1 204 Nothin"));
Response<String> response = example.getString().execute();
assertThat(response.code()).isEqualTo(204);
assertThat(response.body()).isNull();
}
@Test
public void http205SkipsConverter() throws IOException {
final Converter<ResponseBody, String> converter =
value -> {
throw new AssertionError();
};
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(
new ToStringConverterFactory() {
@Override
public Converter<ResponseBody, String> responseBodyConverter(
Type type, Annotation[] annotations, Retrofit retrofit) {
return converter;
}
})
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setStatus("HTTP/1.1 205 Nothin"));
Response<String> response = example.getString().execute();
assertThat(response.code()).isEqualTo(205);
assertThat(response.body()).isNull();
}
@Test
public void converterBodyDoesNotLeakContentInIntermediateBuffers() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(
new Converter.Factory() {
@Override
public Converter<ResponseBody, String> responseBodyConverter(
Type type, Annotation[] annotations, Retrofit retrofit) {
return value -> {
String prefix = value.source().readUtf8(2);
value.source().skip(20_000 - 4);
String suffix = value.source().readUtf8();
return prefix + suffix;
};
}
})
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody(repeat('a', 10_000) + repeat('b', 10_000)));
Response<String> response = example.getString().execute();
assertThat(response.body()).isEqualTo("aabb");
}
@Test
public void executeCallOnce() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse());
Call<String> call = example.getString();
call.execute();
try {
call.execute();
fail();
} catch (IllegalStateException e) {
assertThat(e).hasMessageThat().isEqualTo("Already executed.");
}
}
@Test
public void successfulRequestResponseWhenMimeTypeMissing() throws Exception {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody("Hi").removeHeader("Content-Type"));
Response<String> response = example.getString().execute();
assertThat(response.body()).isEqualTo("Hi");
}
@Test
public void responseBody() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody("1234"));
Response<ResponseBody> response = example.getBody().execute();
assertThat(response.body().string()).isEqualTo("1234");
}
@Test
public void responseBodyBuffers() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(
new MockResponse().setBody("1234").setSocketPolicy(DISCONNECT_DURING_RESPONSE_BODY));
Call<ResponseBody> buffered = example.getBody();
// When buffering we will detect all socket problems before returning the Response.
try {
buffered.execute();
fail();
} catch (IOException e) {
assertThat(e).hasMessageThat().isEqualTo("unexpected end of stream");
}
}
@Test
public void responseBodyStreams() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(
new MockResponse().setBody("1234").setSocketPolicy(DISCONNECT_DURING_RESPONSE_BODY));
Response<ResponseBody> response = example.getStreamingBody().execute();
ResponseBody streamedBody = response.body();
// When streaming we only detect socket problems as the ResponseBody is read.
try {
streamedBody.string();
fail();
} catch (IOException e) {
assertThat(e).hasMessageThat().isEqualTo("unexpected end of stream");
}
}
@Test
public void rawResponseContentTypeAndLengthButNoSource() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody("Hi").addHeader("Content-Type", "text/greeting"));
Response<String> response = example.getString().execute();
assertThat(response.body()).isEqualTo("Hi");
ResponseBody rawBody = response.raw().body();
assertThat(rawBody.contentLength()).isEqualTo(2);
assertThat(rawBody.contentType().toString()).isEqualTo("text/greeting");
try {
rawBody.source();
fail();
} catch (IllegalStateException e) {
assertThat(e)
.hasMessageThat()
.isEqualTo("Cannot read raw response body of a converted body.");
}
}
@Test
public void emptyResponse() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody("").addHeader("Content-Type", "text/stringy"));
Response<String> response = example.getString().execute();
assertThat(response.body()).isEqualTo("");
ResponseBody rawBody = response.raw().body();
assertThat(rawBody.contentLength()).isEqualTo(0);
assertThat(rawBody.contentType().toString()).isEqualTo("text/stringy");
}
@Test
public void reportsExecutedSync() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody("Hi"));
Call<String> call = example.getString();
assertThat(call.isExecuted()).isFalse();
call.execute();
assertThat(call.isExecuted()).isTrue();
}
@Test
public void reportsExecutedAsync() throws InterruptedException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody("Hi"));
Call<String> call = example.getString();
assertThat(call.isExecuted()).isFalse();
call.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {}
@Override
public void onFailure(Call<String> call, Throwable t) {}
});
assertThat(call.isExecuted()).isTrue();
}
@Test
public void cancelBeforeExecute() {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
Call<String> call = service.getString();
call.cancel();
assertThat(call.isCanceled()).isTrue();
try {
call.execute();
fail();
} catch (IOException e) {
assertThat(e).hasMessageThat().isEqualTo("Canceled");
}
}
@Test
public void cancelBeforeEnqueue() throws Exception {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
Call<String> call = service.getString();
call.cancel();
assertThat(call.isCanceled()).isTrue();
final AtomicReference<Throwable> failureRef = new AtomicReference<>();
final CountDownLatch latch = new CountDownLatch(1);
call.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
throw new AssertionError();
}
@Override
public void onFailure(Call<String> call, Throwable t) {
failureRef.set(t);
latch.countDown();
}
});
assertTrue(latch.await(10, SECONDS));
assertThat(failureRef.get()).hasMessageThat().isEqualTo("Canceled");
}
@Test
public void cloningExecutedRequestDoesNotCopyState() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse().setBody("Hi"));
server.enqueue(new MockResponse().setBody("Hello"));
Call<String> call = service.getString();
assertThat(call.execute().body()).isEqualTo("Hi");
Call<String> cloned = call.clone();
assertThat(cloned.execute().body()).isEqualTo("Hello");
}
@Test
public void cancelRequest() throws InterruptedException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.NO_RESPONSE));
Call<String> call = service.getString();
final AtomicReference<Throwable> failureRef = new AtomicReference<>();
final CountDownLatch latch = new CountDownLatch(1);
call.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
throw new AssertionError();
}
@Override
public void onFailure(Call<String> call, Throwable t) {
failureRef.set(t);
latch.countDown();
}
});
call.cancel();
assertThat(call.isCanceled()).isTrue();
assertTrue(latch.await(10, SECONDS));
Throwable failure = failureRef.get();
assertThat(failure).isInstanceOf(IOException.class);
assertThat(failure).hasMessageThat().isEqualTo("Canceled");
}
@Test
public void cancelOkHttpRequest() throws InterruptedException {
OkHttpClient client = new OkHttpClient();
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.client(client)
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse().setSocketPolicy(SocketPolicy.NO_RESPONSE));
Call<String> call = service.getString();
final AtomicReference<Throwable> failureRef = new AtomicReference<>();
final CountDownLatch latch = new CountDownLatch(1);
call.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
throw new AssertionError();
}
@Override
public void onFailure(Call<String> call, Throwable t) {
failureRef.set(t);
latch.countDown();
}
});
// Cancel the underlying HTTP Call. Should be reflected accurately back in the Retrofit Call.
client.dispatcher().cancelAll();
assertThat(call.isCanceled()).isTrue();
assertTrue(latch.await(10, SECONDS));
Throwable failure = failureRef.get();
assertThat(failure).isInstanceOf(IOException.class);
assertThat(failure).hasMessageThat().isEqualTo("Canceled");
}
@Test
public void requestBeforeExecuteCreates() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
return "Hello";
}
};
Call<String> call = service.postRequestBody(a);
call.request();
assertThat(writeCount.get()).isEqualTo(1);
call.execute();
assertThat(writeCount.get()).isEqualTo(1);
}
@Test
public void requestThrowingBeforeExecuteFailsExecute() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
throw new RuntimeException("Broken!");
}
};
Call<String> call = service.postRequestBody(a);
try {
call.request();
fail();
} catch (RuntimeException e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
try {
call.execute();
fail();
} catch (RuntimeException e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
}
@Test
public void requestThrowingNonFatalErrorBeforeExecuteFailsExecute() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
throw new NonFatalError("Broken!");
}
};
Call<String> call = service.postRequestBody(a);
try {
call.request();
fail();
} catch (NonFatalError e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
try {
call.execute();
fail();
} catch (NonFatalError e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
}
@Test
public void requestAfterExecuteReturnsCachedValue() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
return "Hello";
}
};
Call<String> call = service.postRequestBody(a);
call.execute();
assertThat(writeCount.get()).isEqualTo(1);
call.request();
assertThat(writeCount.get()).isEqualTo(1);
}
@Test
public void requestAfterExecuteThrowingAlsoThrows() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
throw new RuntimeException("Broken!");
}
};
Call<String> call = service.postRequestBody(a);
try {
call.execute();
fail();
} catch (RuntimeException e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
try {
call.request();
fail();
} catch (RuntimeException e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
}
@Test
public void requestAfterExecuteThrowingAlsoThrowsForNonFatalErrors() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
throw new NonFatalError("Broken!");
}
};
Call<String> call = service.postRequestBody(a);
try {
call.execute();
fail();
} catch (NonFatalError e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
try {
call.request();
fail();
} catch (NonFatalError e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
}
@Test
public void requestBeforeEnqueueCreates() throws IOException, InterruptedException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
return "Hello";
}
};
Call<String> call = service.postRequestBody(a);
call.request();
assertThat(writeCount.get()).isEqualTo(1);
final CountDownLatch latch = new CountDownLatch(1);
call.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
assertThat(writeCount.get()).isEqualTo(1);
latch.countDown();
}
@Override
public void onFailure(Call<String> call, Throwable t) {}
});
assertTrue(latch.await(10, SECONDS));
}
@Test
public void requestThrowingBeforeEnqueueFailsEnqueue() throws IOException, InterruptedException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
throw new RuntimeException("Broken!");
}
};
Call<String> call = service.postRequestBody(a);
try {
call.request();
fail();
} catch (RuntimeException e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
final CountDownLatch latch = new CountDownLatch(1);
call.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {}
@Override
public void onFailure(Call<String> call, Throwable t) {
// Exact instance check as opposed to isInstanceOf's subtype checking.
assertThat(t.getClass()).isEqualTo(RuntimeException.class);
assertThat(t).hasMessageThat().isEqualTo("Broken!");
assertThat(writeCount.get()).isEqualTo(1);
latch.countDown();
}
});
assertTrue(latch.await(10, SECONDS));
}
@Test
public void requestThrowingNonFatalErrorBeforeEnqueueFailsEnqueue()
throws IOException, InterruptedException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
throw new NonFatalError("Broken!");
}
};
Call<String> call = service.postRequestBody(a);
try {
call.request();
fail();
} catch (NonFatalError e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
final CountDownLatch latch = new CountDownLatch(1);
call.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {}
@Override
public void onFailure(Call<String> call, Throwable t) {
// Exact instance check as opposed to isInstanceOf's subtype checking.
assertThat(t.getClass()).isEqualTo(NonFatalError.class);
assertThat(t).hasMessageThat().isEqualTo("Broken!");
assertThat(writeCount.get()).isEqualTo(1);
latch.countDown();
}
});
assertTrue(latch.await(10, SECONDS));
}
@Test
public void requestAfterEnqueueReturnsCachedValue() throws IOException, InterruptedException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
return "Hello";
}
};
Call<String> call = service.postRequestBody(a);
final CountDownLatch latch = new CountDownLatch(1);
call.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
assertThat(writeCount.get()).isEqualTo(1);
latch.countDown();
}
@Override
public void onFailure(Call<String> call, Throwable t) {}
});
assertTrue(latch.await(10, SECONDS));
call.request();
assertThat(writeCount.get()).isEqualTo(1);
}
@Test
public void requestAfterEnqueueFailingThrows() throws IOException, InterruptedException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
throw new RuntimeException("Broken!");
}
};
Call<String> call = service.postRequestBody(a);
final CountDownLatch latch = new CountDownLatch(1);
call.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {}
@Override
public void onFailure(Call<String> call, Throwable t) {
// Exact instance check as opposed to isInstanceOf's subtype checking.
assertThat(t.getClass()).isEqualTo(RuntimeException.class);
assertThat(t).hasMessageThat().isEqualTo("Broken!");
assertThat(writeCount.get()).isEqualTo(1);
latch.countDown();
}
});
assertTrue(latch.await(10, SECONDS));
try {
call.request();
fail();
} catch (RuntimeException e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
}
@Test
public void requestAfterEnqueueFailingThrowsForNonFatalErrors()
throws IOException, InterruptedException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
throw new NonFatalError("Broken!");
}
};
Call<String> call = service.postRequestBody(a);
final CountDownLatch latch = new CountDownLatch(1);
call.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {}
@Override
public void onFailure(Call<String> call, Throwable t) {
// Exact instance check as opposed to isInstanceOf's subtype checking.
assertThat(t.getClass()).isEqualTo(NonFatalError.class);
assertThat(t).hasMessageThat().isEqualTo("Broken!");
assertThat(writeCount.get()).isEqualTo(1);
latch.countDown();
}
});
assertTrue(latch.await(10, SECONDS));
try {
call.request();
fail();
} catch (NonFatalError e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
}
@Test
public void fatalErrorsAreNotCaughtRequest() throws Exception {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
throw new OutOfMemoryError("Broken!");
}
};
Call<String> call = service.postRequestBody(a);
try {
call.request();
fail();
} catch (OutOfMemoryError e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
try {
call.request();
fail();
} catch (OutOfMemoryError e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(2);
}
@Test
public void fatalErrorsAreNotCaughtEnqueue() throws Exception {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
throw new OutOfMemoryError("Broken!");
}
};
Call<String> call = service.postRequestBody(a);
try {
final AtomicBoolean callsFailureSynchronously = new AtomicBoolean();
call.enqueue(
new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {}
@Override
public void onFailure(Call<String> call, Throwable t) {
callsFailureSynchronously.set(true); // Will not be called for fatal errors.
}
});
assertThat(callsFailureSynchronously.get()).isFalse();
fail();
} catch (OutOfMemoryError e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
try {
call.request();
fail();
} catch (OutOfMemoryError e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(2);
}
@Test
public void fatalErrorsAreNotCaughtExecute() throws Exception {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service service = retrofit.create(Service.class);
server.enqueue(new MockResponse());
final AtomicInteger writeCount = new AtomicInteger();
Object a =
new Object() {
@Override
public String toString() {
writeCount.incrementAndGet();
throw new OutOfMemoryError("Broken!");
}
};
Call<String> call = service.postRequestBody(a);
try {
call.execute();
fail();
} catch (OutOfMemoryError e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(1);
try {
call.request();
fail();
} catch (OutOfMemoryError e) {
assertThat(e).hasMessageThat().isEqualTo("Broken!");
}
assertThat(writeCount.get()).isEqualTo(2);
}
@Test
public void timeoutExceeded() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setHeadersDelay(500, TimeUnit.MILLISECONDS));
Call<String> call = example.getString();
call.timeout().timeout(100, TimeUnit.MILLISECONDS);
try {
call.execute();
fail();
} catch (InterruptedIOException expected) {
}
}
@Test
public void deadlineExceeded() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setHeadersDelay(500, TimeUnit.MILLISECONDS));
Call<String> call = example.getString();
call.timeout().deadline(100, TimeUnit.MILLISECONDS);
try {
call.execute();
fail();
} catch (InterruptedIOException expected) {
}
}
@Test
public void timeoutEnabledButNotExceeded() throws IOException {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Service example = retrofit.create(Service.class);
server.enqueue(new MockResponse().setHeadersDelay(100, TimeUnit.MILLISECONDS));
Call<String> call = example.getString();
call.timeout().deadline(500, TimeUnit.MILLISECONDS);
Response<String> response = call.execute();
assertThat(response.isSuccessful()).isTrue();
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/CompletableFutureCallAdapterFactoryTest.java
================================================
/*
* Copyright (C) 2016 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.fail;
import com.google.common.reflect.TypeToken;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import retrofit2.helpers.ToStringConverterFactory;
public final class CompletableFutureCallAdapterFactoryTest {
private static final Annotation[] NO_ANNOTATIONS = new Annotation[0];
@Rule public final MockWebServer server = new MockWebServer();
private final CallAdapter.Factory factory = new CompletableFutureCallAdapterFactory();
private Retrofit retrofit;
@Before
public void setUp() {
retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
}
@Test
public void responseType() {
Type bodyClass = new TypeToken<CompletableFuture<String>>() {}.getType();
assertThat(factory.get(bodyClass, NO_ANNOTATIONS, retrofit).responseType())
.isEqualTo(String.class);
Type bodyWildcard = new TypeToken<CompletableFuture<? extends String>>() {}.getType();
assertThat(factory.get(bodyWildcard, NO_ANNOTATIONS, retrofit).responseType())
.isEqualTo(String.class);
Type bodyGeneric = new TypeToken<CompletableFuture<List<String>>>() {}.getType();
assertThat(factory.get(bodyGeneric, NO_ANNOTATIONS, retrofit).responseType())
.isEqualTo(new TypeToken<List<String>>() {}.getType());
Type responseClass = new TypeToken<CompletableFuture<Response<String>>>() {}.getType();
assertThat(factory.get(responseClass, NO_ANNOTATIONS, retrofit).responseType())
.isEqualTo(String.class);
Type responseWildcard =
new TypeToken<CompletableFuture<Response<? extends String>>>() {}.getType();
assertThat(factory.get(responseWildcard, NO_ANNOTATIONS, retrofit).responseType())
.isEqualTo(String.class);
Type resultClass = new TypeToken<CompletableFuture<Response<String>>>() {}.getType();
assertThat(factory.get(resultClass, NO_ANNOTATIONS, retrofit).responseType())
.isEqualTo(String.class);
Type resultWildcard =
new TypeToken<CompletableFuture<Response<? extends String>>>() {}.getType();
assertThat(factory.get(resultWildcard, NO_ANNOTATIONS, retrofit).responseType())
.isEqualTo(String.class);
}
@Test
public void nonListenableFutureReturnsNull() {
CallAdapter<?, ?> adapter = factory.get(String.class, NO_ANNOTATIONS, retrofit);
assertThat(adapter).isNull();
}
@Test
public void rawTypeThrows() {
Type observableType = new TypeToken<CompletableFuture>() {}.getType();
try {
factory.get(observableType, NO_ANNOTATIONS, retrofit);
fail();
} catch (IllegalStateException e) {
assertThat(e)
.hasMessageThat()
.isEqualTo(
"CompletableFuture return type must be parameterized as CompletableFuture<Foo> or CompletableFuture<? extends Foo>");
}
}
@Test
public void rawResponseTypeThrows() {
Type observableType = new TypeToken<CompletableFuture<Response>>() {}.getType();
try {
factory.get(observableType, NO_ANNOTATIONS, retrofit);
fail();
} catch (IllegalStateException e) {
assertThat(e)
.hasMessageThat()
.isEqualTo("Response must be parameterized as Response<Foo> or Response<? extends Foo>");
}
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/CompletableFutureTest.java
================================================
/*
* Copyright (C) 2016 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import static com.google.common.truth.Truth.assertThat;
import static okhttp3.mockwebserver.SocketPolicy.DISCONNECT_AFTER_REQUEST;
import static org.junit.Assert.fail;
import java.io.IOException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import retrofit2.helpers.ToStringConverterFactory;
import retrofit2.http.GET;
public final class CompletableFutureTest {
@Rule public final MockWebServer server = new MockWebServer();
interface Service {
@GET("/")
CompletableFuture<String> body();
@GET("/")
CompletableFuture<Response<String>> response();
}
private Service service;
@Before
public void setUp() {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
service = retrofit.create(Service.class);
}
@Test
public void bodySuccess200() throws Exception {
server.enqueue(new MockResponse().setBody("Hi"));
CompletableFuture<String> future = service.body();
assertThat(future.get()).isEqualTo("Hi");
}
@Test
public void bodySuccess404() throws Exception {
server.enqueue(new MockResponse().setResponseCode(404));
CompletableFuture<String> future = service.body();
try {
future.get();
fail();
} catch (ExecutionException e) {
Throwable cause = e.getCause();
assertThat(cause).isInstanceOf(HttpException.class);
assertThat(cause).hasMessageThat().isEqualTo("HTTP 404 Client Error");
}
}
@Test
public void bodyFailure() throws Exception {
server.enqueue(new MockResponse().setSocketPolicy(DISCONNECT_AFTER_REQUEST));
CompletableFuture<String> future = service.body();
try {
future.get();
fail();
} catch (ExecutionException e) {
assertThat(e).hasCauseThat().isInstanceOf(IOException.class);
}
}
@Test
public void responseSuccess200() throws Exception {
server.enqueue(new MockResponse().setBody("Hi"));
CompletableFuture<Response<String>> future = service.response();
Response<String> response = future.get();
assertThat(response.isSuccessful()).isTrue();
assertThat(response.body()).isEqualTo("Hi");
}
@Test
public void responseSuccess404() throws Exception {
server.enqueue(new MockResponse().setResponseCode(404).setBody("Hi"));
CompletableFuture<Response<String>> future = service.response();
Response<String> response = future.get();
assertThat(response.isSuccessful()).isFalse();
assertThat(response.errorBody().string()).isEqualTo("Hi");
}
@Test
public void responseFailure() throws Exception {
server.enqueue(new MockResponse().setSocketPolicy(DISCONNECT_AFTER_REQUEST));
CompletableFuture<Response<String>> future = service.response();
try {
future.get();
fail();
} catch (ExecutionException e) {
assertThat(e).hasCauseThat().isInstanceOf(IOException.class);
}
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/DefaultCallAdapterFactoryTest.java
================================================
/*
* Copyright (C) 2015 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import com.google.common.reflect.TypeToken;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import okhttp3.Request;
import okio.Timeout;
import org.junit.Test;
@SuppressWarnings("unchecked")
public final class DefaultCallAdapterFactoryTest {
private static final Annotation[] NO_ANNOTATIONS = new Annotation[0];
private final Retrofit retrofit = new Retrofit.Builder().baseUrl("http://localhost:1").build();
private final CallAdapter.Factory factory = new DefaultCallAdapterFactory(Runnable::run);
@Test
public void rawTypeThrows() {
try {
factory.get(Call.class, NO_ANNOTATIONS, retrofit);
fail();
} catch (IllegalArgumentException e) {
assertThat(e)
.hasMessageThat()
.isEqualTo("Call return type must be parameterized as Call<Foo> or Call<? extends Foo>");
}
}
@Test
public void responseType() {
Type classType = new TypeToken<Call<String>>() {}.getType();
assertThat(factory.get(classType, NO_ANNOTATIONS, retrofit).responseType())
.isEqualTo(String.class);
Type wilcardType = new TypeToken<Call<? extends String>>() {}.getType();
assertThat(factory.get(wilcardType, NO_ANNOTATIONS, retrofit).responseType())
.isEqualTo(String.class);
Type genericType = new TypeToken<Call<List<String>>>() {}.getType();
assertThat(factory.get(genericType, NO_ANNOTATIONS, retrofit).responseType())
.isEqualTo(new TypeToken<List<String>>() {}.getType());
}
@Test
public void adaptedCallExecute() throws IOException {
Type returnType = new TypeToken<Call<String>>() {}.getType();
CallAdapter<String, Call<String>> adapter =
(CallAdapter<String, Call<String>>) factory.get(returnType, NO_ANNOTATIONS, retrofit);
final Response<String> response = Response.success("Hi");
Call<String> call =
adapter.adapt(
new EmptyCall() {
@Override
public Response<String> execute() {
return response;
}
});
assertThat(call.execute()).isSameInstanceAs(response);
}
@Test
public void adaptedCallCloneDeepCopy() {
Type returnType = new TypeToken<Call<String>>() {}.getType();
CallAdapter<String, Call<String>> adapter =
(CallAdapter<String, Call<String>>) factory.get(returnType, NO_ANNOTATIONS, retrofit);
final AtomicBoolean cloned = new AtomicBoolean();
Call<String> delegate =
new EmptyCall() {
@Override
public Call<String> clone() {
cloned.set(true);
return this;
}
};
Call<String> call = adapter.adapt(delegate);
assertThat(call.clone()).isNotSameInstanceAs(call);
assertTrue(cloned.get());
}
@Test
public void adaptedCallCancel() {
Type returnType = new TypeToken<Call<String>>() {}.getType();
CallAdapter<String, Call<String>> adapter =
(CallAdapter<String, Call<String>>) factory.get(returnType, NO_ANNOTATIONS, retrofit);
final AtomicBoolean canceled = new AtomicBoolean();
Call<String> delegate =
new EmptyCall() {
@Override
public void cancel() {
canceled.set(true);
}
};
Call<String> call = adapter.adapt(delegate);
call.cancel();
assertTrue(canceled.get());
}
static class EmptyCall implements Call<String> {
@Override
public void enqueue(Callback<String> callback) {
throw new UnsupportedOperationException();
}
@Override
public boolean isExecuted() {
return false;
}
@Override
public Response<String> execute() throws IOException {
throw new UnsupportedOperationException();
}
@Override
public void cancel() {
throw new UnsupportedOperationException();
}
@Override
public boolean isCanceled() {
return false;
}
@Override
public Call<String> clone() {
throw new UnsupportedOperationException();
}
@Override
public Request request() {
throw new UnsupportedOperationException();
}
@Override
public Timeout timeout() {
return Timeout.NONE;
}
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/DefaultMethodsTest.java
================================================
/*
* Copyright (C) 2016 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import static com.google.common.truth.Truth.assertThat;
import java.io.IOException;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.Rule;
import org.junit.Test;
import retrofit2.helpers.ToStringConverterFactory;
import retrofit2.http.GET;
import retrofit2.http.Query;
public final class DefaultMethodsTest {
@Rule public final MockWebServer server = new MockWebServer();
interface Example {
@GET("/")
Call<String> user(@Query("name") String name);
default Call<String> user() {
return user("hey");
}
}
@Test
public void test() throws IOException {
server.enqueue(new MockResponse().setBody("Hi"));
server.enqueue(new MockResponse().setBody("Hi"));
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.build();
Example example = retrofit.create(Example.class);
Response<String> response = example.user().execute();
assertThat(response.body()).isEqualTo("Hi");
Response<String> response2 = example.user("Hi").execute();
assertThat(response2.body()).isEqualTo("Hi");
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/HttpExceptionTest.java
================================================
/*
* Copyright (C) 2016 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.fail;
import org.junit.Test;
public final class HttpExceptionTest {
@Test
public void response() {
Response<String> response = Response.success("Hi");
HttpException exception = new HttpException(response);
assertThat(exception.code()).isEqualTo(200);
assertThat(exception.message()).isEqualTo("OK");
assertThat(exception.response()).isSameInstanceAs(response);
}
@Test
public void nullResponseThrows() {
try {
new HttpException(null);
fail();
} catch (NullPointerException e) {
assertThat(e).hasMessageThat().isEqualTo("response == null");
}
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/InvocationTest.java
================================================
/*
* Copyright (C) 2018 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.fail;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import org.junit.Test;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.Url;
public final class InvocationTest {
interface Example {
@POST("/{p1}") //
Call<ResponseBody> postMethod(
@Path("p1") String p1, @Query("p2") String p2, @Body RequestBody body);
@GET //
Call<ResponseBody> urlMethod(@Url String url);
}
interface ExampleSub extends Example {}
@Test
public void invocationObjectOnCallAndRequestTag() {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl("http://example.com/")
.callFactory(new OkHttpClient())
.build();
Example example = retrofit.create(Example.class);
RequestBody requestBody = RequestBody.create(MediaType.get("text/plain"), "three");
Call<ResponseBody> call = example.postMethod("one", "two", requestBody);
Invocation invocation = call.request().tag(Invocation.class);
Method method = invocation.method();
assertThat(method.getName()).isEqualTo("postMethod");
assertThat(method.getDeclaringClass()).isEqualTo(Example.class);
assertThat(invocation.arguments()).isEqualTo(Arrays.asList("one", "two", requestBody));
assertThat(invocation.annotationUrl()).isEqualTo("/{p1}");
}
@Test
public void invocationCorrectlyIdentifiesServiceMethodInvocation() {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl("http://example.com/")
.callFactory(new OkHttpClient())
.build();
ExampleSub example = retrofit.create(ExampleSub.class);
RequestBody requestBody = RequestBody.create(MediaType.get("text/plain"), "three");
Call<ResponseBody> call = example.postMethod("one", "two", requestBody);
Invocation invocation = call.request().tag(Invocation.class);
assertThat(invocation.service()).isEqualTo(ExampleSub.class);
assertThat(invocation.instance()).isSameInstanceAs(example);
assertThat(invocation.method().getName()).isEqualTo("postMethod");
assertThat(invocation.method().getDeclaringClass()).isEqualTo(Example.class);
assertThat(invocation.arguments()).isEqualTo(Arrays.asList("one", "two", requestBody));
assertThat(invocation.annotationUrl()).isEqualTo("/{p1}");
}
@Test
public void annotationUrlAbsent() {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl("http://example.com/")
.callFactory(new OkHttpClient())
.build();
Example example = retrofit.create(Example.class);
Call<ResponseBody> call = example.urlMethod("/abc");
Invocation invocation = call.request().tag(Invocation.class);
Method method = invocation.method();
assertThat(method.getName()).isEqualTo("urlMethod");
assertThat(method.getDeclaringClass()).isEqualTo(Example.class);
assertThat(invocation.arguments()).isEqualTo(Arrays.asList("/abc"));
assertThat(invocation.annotationUrl()).isNull();
}
@Test
public void ofInstance() {
try {
Invocation.of(
null, new Object(), Object.class.getDeclaredMethods()[0], Arrays.asList("one", "two"));
fail();
} catch (NullPointerException expected) {
assertThat(expected).hasMessageThat().isEqualTo("service == null");
}
}
@Test
public void nullService() {
Object service = new Object();
Method method = Object.class.getDeclaredMethods()[0];
List<?> arguments = Arrays.asList("one", "two");
Invocation invocation = Invocation.of(Object.class, service, method, arguments, "/abc");
assertThat(invocation.service()).isEqualTo(Object.class);
assertThat(invocation.instance()).isEqualTo(service);
assertThat(invocation.method()).isEqualTo(method);
assertThat(invocation.arguments()).isEqualTo(arguments);
assertThat(invocation.annotationUrl()).isEqualTo("/abc");
}
@Test
public void nullInstance() {
try {
Invocation.of(
Object.class,
null,
Object.class.getDeclaredMethods()[0],
Arrays.asList("one", "two"),
null);
fail();
} catch (NullPointerException expected) {
assertThat(expected).hasMessageThat().isEqualTo("instance == null");
}
}
@Test
public void nullMethod() {
try {
Invocation.of(Object.class, new Object(), null, Arrays.asList("one", "two"), null);
fail();
} catch (NullPointerException expected) {
assertThat(expected).hasMessageThat().isEqualTo("method == null");
}
}
@Test
public void nullArguments() {
try {
Invocation.of(Object.class, new Object(), Example.class.getDeclaredMethods()[0], null, null);
fail();
} catch (NullPointerException expected) {
assertThat(expected).hasMessageThat().isEqualTo("arguments == null");
}
}
@Test
public void deprecatedNullMethod() {
try {
Invocation.of(null, Arrays.asList("one", "two"));
fail();
} catch (NullPointerException expected) {
assertThat(expected).hasMessageThat().isEqualTo("method == null");
}
}
@Test
public void deprecatedNullArguments() {
try {
Invocation.of(Example.class.getDeclaredMethods()[0], null);
fail();
} catch (NullPointerException expected) {
assertThat(expected).hasMessageThat().isEqualTo("arguments == null");
}
}
@Test
public void argumentsAreImmutable() {
List<String> mutableList = new ArrayList<>(Arrays.asList("one", "two"));
Invocation invocation = Invocation.of(Example.class.getDeclaredMethods()[0], mutableList);
mutableList.add("three");
assertThat(invocation.arguments()).isEqualTo(Arrays.asList("one", "two"));
try {
invocation.arguments().clear();
fail();
} catch (UnsupportedOperationException expected) {
}
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/Java8DefaultStaticMethodsInValidationTest.java
================================================
/*
* Copyright (C) 2016 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import static org.junit.Assert.assertNotNull;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.Rule;
import org.junit.Test;
import retrofit2.helpers.ToStringConverterFactory;
import retrofit2.http.GET;
import retrofit2.http.Query;
public final class Java8DefaultStaticMethodsInValidationTest {
@Rule public final MockWebServer server = new MockWebServer();
interface Example {
@GET("/")
Call<String> user(@Query("name") String name);
default Call<String> user() {
return user("hey");
}
static String staticMethod() {
return "Hi";
}
}
@Test
public void test() {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ToStringConverterFactory())
.validateEagerly(true)
.build();
assertNotNull(retrofit.create(Example.class));
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/MethodParameterReflectionTest.java
================================================
/*
* Copyright (C) 2024 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.fail;
import okhttp3.ResponseBody;
import org.junit.Test;
import retrofit2.helpers.ExampleWithoutParameterNames;
import retrofit2.http.GET;
public final class MethodParameterReflectionTest {
private final Retrofit retrofit =
new Retrofit.Builder().baseUrl("http://example.com/").validateEagerly(true).build();
@Test
public void paramIndexIsUsedWithoutParamReflection() {
try {
retrofit.create(ExampleWithoutParameterNames.class);
fail();
} catch (IllegalArgumentException e) {
assertThat(e)
.hasMessageThat()
.isEqualTo(
"No Retrofit annotation found. (parameter #1)\n for method ExampleWithoutParameterNames.method");
}
}
/** This module is compiled with parameter names embedded in the class file. */
interface ExampleWithParameterNames {
@GET("/") //
Call<ResponseBody> method(String theFirstParameter);
}
@Test
public void paramNameIsUsedWithParamReflection() {
try {
retrofit.create(ExampleWithParameterNames.class);
fail();
} catch (IllegalArgumentException e) {
assertThat(e)
.hasMessageThat()
.isEqualTo(
"No Retrofit annotation found. (parameter 'theFirstParameter')\n for method ExampleWithParameterNames.method");
}
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/NonFatalError.java
================================================
/*
* Copyright (C) 2020 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
final class NonFatalError extends Error {
NonFatalError(String message) {
super(message);
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/OptionalConverterFactoryTest.java
================================================
/*
* Copyright (C) 2017 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import static com.google.common.truth.Truth.assertThat;
import java.io.IOException;
import java.util.Optional;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import retrofit2.helpers.ObjectInstanceConverterFactory;
import retrofit2.http.GET;
public final class OptionalConverterFactoryTest {
interface Service {
@GET("/")
Call<Optional<Object>> optional();
@GET("/")
Call<Object> object();
}
@Rule public final MockWebServer server = new MockWebServer();
private Service service;
@Before
public void setUp() {
Retrofit retrofit =
new Retrofit.Builder()
.baseUrl(server.url("/"))
.addConverterFactory(new ObjectInstanceConverterFactory())
.build();
service = retrofit.create(Service.class);
}
@Test
public void optional() throws IOException {
server.enqueue(new MockResponse());
Optional<Object> optional = service.optional().execute().body();
assertThat(optional).isNotNull();
assertThat(optional.get()).isSameInstanceAs(ObjectInstanceConverterFactory.VALUE);
}
@Test
public void onlyMatchesOptional() throws IOException {
server.enqueue(new MockResponse());
Object body = service.object().execute().body();
assertThat(body).isSameInstanceAs(ObjectInstanceConverterFactory.VALUE);
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/RequestFactoryBuilderTest.java
================================================
/*
* Copyright (C) 2013 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import static com.google.common.truth.Truth.assertThat;
import java.util.Set;
import org.junit.Test;
// TODO this test is far too white box, migrate to black box.
public final class RequestFactoryBuilderTest {
@Test
public void pathParameterParsing() throws Exception {
expectParams("/");
expectParams("/foo");
expectParams("/foo/bar");
expectParams("/foo/bar/{}");
expectParams("/foo/bar/{taco}", "taco");
expectParams("/foo/bar/{t}", "t");
expectParams("/foo/bar/{!!!}/"); // Invalid parameter.
expectParams("/foo/bar/{}/{taco}", "taco");
expectParams("/foo/bar/{taco}/or/{burrito}", "taco", "burrito");
expectParams("/foo/bar/{taco}/or/{taco}", "taco");
expectParams("/foo/bar/{taco-shell}", "taco-shell");
expectParams("/foo/bar/{taco_shell}", "taco_shell");
expectParams("/foo/bar/{sha256}", "sha256");
expectParams("/foo/bar/{TACO}", "TACO");
expectParams("/foo/bar/{taco}/{tAco}/{taCo}", "taco", "tAco", "taCo");
expectParams("/foo/bar/{1}"); // Invalid parameter, name cannot start with digit.
}
private static void expectParams(String path, String... expected) {
Set<String> calculated = RequestFactory.Builder.parsePathParameters(path);
assertThat(calculated).containsExactlyElementsIn(expected);
}
}
================================================
FILE: retrofit/java-test/src/test/java/retrofit2/RequestFactoryTest.java
================================================
/*
* Copyright (C) 2013 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package retrofit2;
import static com.google.common.truth.Truth.assertThat;
import static java.util.Arrays.asList;
import static java.util.Collections.emptyList;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import static retrofit2.TestingUtils.buildRequest;
import java.io.IOException;
import java.math.BigInteger;
import java.net.URI;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import okhttp3.HttpUrl;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okio.Buffer;
import org.junit.Ignore;
import org.junit.Test;
import retrofit2.helpers.NullObjectConverterFactory;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.HEAD;
import retrofit2.http.HTTP;
import retrofit2.http.Header;
import retrofit2.http.HeaderMap;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.OPTIONS;
import retrofit2.http.PATCH;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import retrofit2.http.QueryName;
import retrofit2.http.Tag;
import retrofit2.http.Url;
@SuppressWarnings({"UnusedParameters", "unused"}) // Parameters inspected reflectively.
public final class RequestFactoryTest {
private static final MediaType TEXT_PLAIN = MediaType.get("text/plain");
@Test
public void customMethodNoBody() {
class Example {
@HTTP(method = "CUSTOM1", path = "/foo")
Call<ResponseBody> method() {
return null;
}
}
Request request = buildRequest(Example.class);
assertThat(request.method()).isEqualTo("CUSTOM1");
assertThat(request.url().toString()).isEqualTo("http://example.com/foo");
assertThat(request.body()).isNull();
}
@Test
public void customMethodWithBody() {
class Example {
@HTTP(method = "CUSTOM2", path = "/foo", hasBody = true)
Call<ResponseBody> method(@Body RequestBody body) {
return null;
}
}
RequestBody body = RequestBody.create(TEXT_PLAIN, "hi");
Request request = buildRequest(Example.class, body);
assertThat(request.method()).isEqualTo("CUSTOM2");
assertThat(request.url().toString()).isEqualTo("http://example.com/foo");
assertBody(request.body(), "hi");
}
@Test
public void onlyOneEncodingIsAllowedMultipartFirst() {
class Example {
@Multipart //
@FormUrlEncoded //
@POST("/") //
Call<ResponseBody> method() {
return null;
}
}
try {
buildRequest(Example.class);
fail();
} catch (IllegalArgumentException e) {
assertThat(e)
.hasMessageThat()
.isEqualTo("Only one encoding annotation is allowed.\n for method Example.method");
}
}
@Test
public void onlyOneEncodingIsAllowedFormEncodingFirst() {
class Example {
@FormUrlEncoded //
@Multipart //
@POST("/") //
Call<ResponseBody> method() {
return null;
}
}
try {
buildRequest(Example.class);
fail();
} catch (IllegalArgumentException e) {
assertThat(e)
.hasMessageThat()
.isEqualTo("Only one encoding annotation is allowed.\n for method Example.method");
}
}
@Test
public void invalidPathParam() throws Exception {
class Example {
@GET("/") //
Call<ResponseBody> method(@Path("hey!") String thing) {
return null;
}
}
try {
buildRequest(Example.class);
fail();
} catch (IllegalArgumentException e) {
assertThat(e)
.hasMessageThat()
.isEqualTo(
"@Path parameter name must match \\{([a-zA-Z][a-zA-Z0-9_-]*)\\}."
+ " Found: hey! (parameter 'thing')\n for method Example.method");
}
}
@Test
public void pathParamNotAllowedInQuery() throws Exception {
class Example {
@GET("/foo?bar={bar}") //
Call<ResponseBody> method(@Path("bar") String thing) {
return null;
}
}
try {
buildRequest(Example.class);
fail();
} catch (IllegalArgumentException e) {
assertThat(e)
.hasMessageThat()
.isEqualTo(
"URL query string \"bar={bar}\" must not have replace block."
+ " For dynamic query parameters use @Query.\n for method Example.method");
}
}
@Test
public void multipleParameterAnnotationsNotAllowed() throws Exception {
class Example {
@GET("/") //
Call<ResponseBody> method(@Body @Query("nope") String o) {
return null;
}
}
try {
buildRequest(Example.class);
fail();
} catch (IllegalArgumentException e) {
assertThat(e)
gitextract_f65trsdv/
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── CONTRIBUTING.md
│ ├── ISSUE_TEMPLATE.md
│ ├── pull_request_template.md
│ ├── renovate.json5
│ └── workflows/
│ ├── .java-version
│ ├── build.yml
│ └── release.yaml
├── .gitignore
├── BUG-BOUNTY.md
├── CHANGELOG.md
├── LICENSE.txt
├── README.md
├── RELEASING.md
├── build.gradle
├── gradle/
│ ├── libs.versions.toml
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── retrofit/
│ ├── android-test/
│ │ ├── build.gradle
│ │ ├── debug.keystore
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ ├── BasicCallTest.java
│ │ │ ├── CompletableFutureAndroidTest.java
│ │ │ ├── DefaultMethodsAndroidTest.java
│ │ │ ├── OptionalConverterFactoryAndroidTest.java
│ │ │ └── UriAndroidTest.java
│ │ └── main/
│ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── java-test/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ └── src/
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ ├── AnnotationArraySubject.java
│ │ ├── CallAdapterTest.java
│ │ ├── CallTest.java
│ │ ├── CompletableFutureCallAdapterFactoryTest.java
│ │ ├── CompletableFutureTest.java
│ │ ├── DefaultCallAdapterFactoryTest.java
│ │ ├── DefaultMethodsTest.java
│ │ ├── HttpExceptionTest.java
│ │ ├── InvocationTest.java
│ │ ├── Java8DefaultStaticMethodsInValidationTest.java
│ │ ├── MethodParameterReflectionTest.java
│ │ ├── NonFatalError.java
│ │ ├── OptionalConverterFactoryTest.java
│ │ ├── RequestFactoryBuilderTest.java
│ │ ├── RequestFactoryTest.java
│ │ ├── ResponseTest.java
│ │ └── RetrofitTest.java
│ ├── kotlin-test/
│ │ ├── build.gradle
│ │ └── src/
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ ├── KotlinExtensionsTest.kt
│ │ ├── KotlinRequestFactoryTest.java
│ │ ├── KotlinSuspendRawTest.java
│ │ ├── KotlinSuspendTest.kt
│ │ └── KotlinUnitTest.java
│ ├── robovm-test/
│ │ ├── build.gradle
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── RoboVmPlatformTest.java
│ ├── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── retrofit2/
│ │ │ ├── AndroidMainExecutor.java
│ │ │ ├── BuiltInConverters.java
│ │ │ ├── BuiltInFactories.java
│ │ │ ├── Call.java
│ │ │ ├── CallAdapter.java
│ │ │ ├── Callback.java
│ │ │ ├── CompletableFutureCallAdapterFactory.java
│ │ │ ├── Converter.java
│ │ │ ├── DefaultCallAdapterFactory.java
│ │ │ ├── DefaultMethodSupport.java
│ │ │ ├── HttpException.java
│ │ │ ├── HttpServiceMethod.java
│ │ │ ├── Invocation.java
│ │ │ ├── KotlinExtensions.kt
│ │ │ ├── OkHttpCall.java
│ │ │ ├── OptionalConverterFactory.java
│ │ │ ├── ParameterHandler.java
│ │ │ ├── Platform.java
│ │ │ ├── Reflection.java
│ │ │ ├── RequestBuilder.java
│ │ │ ├── RequestFactory.java
│ │ │ ├── Response.java
│ │ │ ├── Retrofit.java
│ │ │ ├── ServiceMethod.java
│ │ │ ├── SkipCallbackExecutor.java
│ │ │ ├── SkipCallbackExecutorImpl.java
│ │ │ ├── Utils.java
│ │ │ ├── http/
│ │ │ │ ├── Body.java
│ │ │ │ ├── DELETE.java
│ │ │ │ ├── Field.java
│ │ │ │ ├── FieldMap.java
│ │ │ │ ├── FormUrlEncoded.java
│ │ │ │ ├── GET.java
│ │ │ │ ├── HEAD.java
│ │ │ │ ├── HTTP.java
│ │ │ │ ├── Header.java
│ │ │ │ ├── HeaderMap.java
│ │ │ │ ├── Headers.java
│ │ │ │ ├── Multipart.java
│ │ │ │ ├── OPTIONS.java
│ │ │ │ ├── PATCH.java
│ │ │ │ ├── POST.java
│ │ │ │ ├── PUT.java
│ │ │ │ ├── Part.java
│ │ │ │ ├── PartMap.java
│ │ │ │ ├── Path.java
│ │ │ │ ├── Query.java
│ │ │ │ ├── QueryMap.java
│ │ │ │ ├── QueryName.java
│ │ │ │ ├── Streaming.java
│ │ │ │ ├── Tag.java
│ │ │ │ ├── Url.java
│ │ │ │ └── package-info.java
│ │ │ ├── internal/
│ │ │ │ └── EverythingIsNonNull.java
│ │ │ └── package-info.java
│ │ ├── java14/
│ │ │ └── retrofit2/
│ │ │ └── DefaultMethodSupport.java
│ │ ├── java16/
│ │ │ └── retrofit2/
│ │ │ └── DefaultMethodSupport.java
│ │ └── resources/
│ │ └── META-INF/
│ │ └── proguard/
│ │ └── retrofit2.pro
│ └── test-helpers/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── retrofit2/
│ ├── TestingUtils.java
│ └── helpers/
│ ├── DelegatingCallAdapterFactory.java
│ ├── ExampleWithoutParameterNames.java
│ ├── NonMatchingCallAdapterFactory.java
│ ├── NonMatchingConverterFactory.java
│ ├── NullObjectConverterFactory.java
│ ├── ObjectInstanceConverterFactory.java
│ └── ToStringConverterFactory.java
├── retrofit-adapters/
│ ├── README.md
│ ├── guava/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── adapter/
│ │ │ └── guava/
│ │ │ ├── GuavaCallAdapterFactory.java
│ │ │ ├── HttpException.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── adapter/
│ │ └── guava/
│ │ ├── GuavaCallAdapterFactoryTest.java
│ │ ├── ListenableFutureTest.java
│ │ └── StringConverterFactory.java
│ ├── java8/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── adapter/
│ │ │ └── java8/
│ │ │ ├── HttpException.java
│ │ │ ├── Java8CallAdapterFactory.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── adapter/
│ │ └── java8/
│ │ ├── CompletableFutureTest.java
│ │ ├── Java8CallAdapterFactoryTest.java
│ │ └── StringConverterFactory.java
│ ├── rxjava/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── retrofit2/
│ │ │ │ └── adapter/
│ │ │ │ └── rxjava/
│ │ │ │ ├── BodyOnSubscribe.java
│ │ │ │ ├── CallArbiter.java
│ │ │ │ ├── CallEnqueueOnSubscribe.java
│ │ │ │ ├── CallExecuteOnSubscribe.java
│ │ │ │ ├── HttpException.java
│ │ │ │ ├── Result.java
│ │ │ │ ├── ResultOnSubscribe.java
│ │ │ │ ├── RxJavaCallAdapter.java
│ │ │ │ ├── RxJavaCallAdapterFactory.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── proguard/
│ │ │ └── retrofit2-rxjava-adapter.pro
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── adapter/
│ │ └── rxjava/
│ │ ├── AsyncTest.java
│ │ ├── CancelDisposeTest.java
│ │ ├── CompletableTest.java
│ │ ├── CompletableThrowingSafeSubscriberTest.java
│ │ ├── CompletableThrowingTest.java
│ │ ├── CompletableWithSchedulerTest.java
│ │ ├── ForwardingSubscriber.java
│ │ ├── ObservableTest.java
│ │ ├── ObservableThrowingSafeSubscriberTest.java
│ │ ├── ObservableThrowingTest.java
│ │ ├── ObservableWithSchedulerTest.java
│ │ ├── RecordingSubscriber.java
│ │ ├── ResultTest.java
│ │ ├── RxJavaCallAdapterFactoryTest.java
│ │ ├── RxJavaPluginsResetRule.java
│ │ ├── SingleTest.java
│ │ ├── SingleThrowingTest.java
│ │ ├── SingleWithSchedulerTest.java
│ │ └── StringConverterFactory.java
│ ├── rxjava2/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── retrofit2/
│ │ │ │ └── adapter/
│ │ │ │ └── rxjava2/
│ │ │ │ ├── BodyObservable.java
│ │ │ │ ├── CallEnqueueObservable.java
│ │ │ │ ├── CallExecuteObservable.java
│ │ │ │ ├── HttpException.java
│ │ │ │ ├── Result.java
│ │ │ │ ├── ResultObservable.java
│ │ │ │ ├── RxJava2CallAdapter.java
│ │ │ │ ├── RxJava2CallAdapterFactory.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── proguard/
│ │ │ └── retrofit2-rxjava2-adapter.pro
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── adapter/
│ │ └── rxjava2/
│ │ ├── AsyncTest.java
│ │ ├── CancelDisposeTest.java
│ │ ├── CancelDisposeTestSync.java
│ │ ├── CompletableTest.java
│ │ ├── CompletableThrowingTest.java
│ │ ├── CompletableWithSchedulerTest.java
│ │ ├── FlowableTest.java
│ │ ├── FlowableThrowingTest.java
│ │ ├── FlowableWithSchedulerTest.java
│ │ ├── MaybeTest.java
│ │ ├── MaybeThrowingTest.java
│ │ ├── MaybeWithSchedulerTest.java
│ │ ├── ObservableTest.java
│ │ ├── ObservableThrowingTest.java
│ │ ├── ObservableWithSchedulerTest.java
│ │ ├── RecordingCompletableObserver.java
│ │ ├── RecordingMaybeObserver.java
│ │ ├── RecordingObserver.java
│ │ ├── RecordingSingleObserver.java
│ │ ├── RecordingSubscriber.java
│ │ ├── ResultTest.java
│ │ ├── RxJava2CallAdapterFactoryTest.java
│ │ ├── RxJavaPluginsResetRule.java
│ │ ├── SingleTest.java
│ │ ├── SingleThrowingTest.java
│ │ ├── SingleWithSchedulerTest.java
│ │ └── StringConverterFactory.java
│ ├── rxjava3/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── retrofit2/
│ │ │ │ └── adapter/
│ │ │ │ └── rxjava3/
│ │ │ │ ├── BodyObservable.java
│ │ │ │ ├── CallEnqueueObservable.java
│ │ │ │ ├── CallExecuteObservable.java
│ │ │ │ ├── HttpException.java
│ │ │ │ ├── Result.java
│ │ │ │ ├── ResultObservable.java
│ │ │ │ ├── RxJava3CallAdapter.java
│ │ │ │ ├── RxJava3CallAdapterFactory.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── proguard/
│ │ │ └── retrofit2-rxjava3-adapter.pro
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── adapter/
│ │ └── rxjava3/
│ │ ├── AsyncTest.java
│ │ ├── CancelDisposeTest.java
│ │ ├── CancelDisposeTestSync.java
│ │ ├── CompletableTest.java
│ │ ├── CompletableThrowingTest.java
│ │ ├── CompletableWithSchedulerTest.java
│ │ ├── FlowableTest.java
│ │ ├── FlowableThrowingTest.java
│ │ ├── FlowableWithSchedulerTest.java
│ │ ├── MaybeTest.java
│ │ ├── MaybeThrowingTest.java
│ │ ├── MaybeWithSchedulerTest.java
│ │ ├── ObservableTest.java
│ │ ├── ObservableThrowingTest.java
│ │ ├── ObservableWithSchedulerTest.java
│ │ ├── RecordingCompletableObserver.java
│ │ ├── RecordingMaybeObserver.java
│ │ ├── RecordingObserver.java
│ │ ├── RecordingSingleObserver.java
│ │ ├── RecordingSubscriber.java
│ │ ├── ResultTest.java
│ │ ├── RxJava3CallAdapterFactoryTest.java
│ │ ├── RxJavaPluginsResetRule.java
│ │ ├── SingleTest.java
│ │ ├── SingleThrowingTest.java
│ │ ├── SingleWithSchedulerTest.java
│ │ └── StringConverterFactory.java
│ └── scala/
│ ├── README.md
│ ├── build.gradle
│ ├── gradle.properties
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── adapter/
│ │ └── scala/
│ │ ├── BodyCallAdapter.java
│ │ ├── ResponseCallAdapter.java
│ │ ├── ScalaCallAdapterFactory.java
│ │ └── package-info.java
│ └── test/
│ └── java/
│ └── retrofit2/
│ └── adapter/
│ └── scala/
│ ├── FutureTest.java
│ ├── ScalaCallAdapterFactoryTest.java
│ └── StringConverterFactory.java
├── retrofit-bom/
│ ├── build.gradle
│ └── gradle.properties
├── retrofit-converters/
│ ├── README.md
│ ├── gson/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── gson/
│ │ │ ├── GsonConverterFactory.java
│ │ │ ├── GsonRequestBodyConverter.java
│ │ │ ├── GsonResponseBodyConverter.java
│ │ │ ├── GsonStreamingRequestBody.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── gson/
│ │ └── GsonConverterFactoryTest.java
│ ├── guava/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── retrofit/
│ │ │ │ └── converter/
│ │ │ │ └── guava/
│ │ │ │ ├── GuavaOptionalConverterFactory.java
│ │ │ │ ├── OptionalConverter.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── proguard/
│ │ │ └── retrofit2-guava-converter.pro
│ │ └── test/
│ │ └── java/
│ │ └── retrofit/
│ │ └── converter/
│ │ └── guava/
│ │ ├── AlwaysNullConverterFactory.java
│ │ └── GuavaOptionalConverterFactoryTest.java
│ ├── jackson/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── jackson/
│ │ │ ├── JacksonConverterFactory.java
│ │ │ ├── JacksonRequestBodyConverter.java
│ │ │ ├── JacksonResponseBodyConverter.java
│ │ │ ├── JacksonStreamingRequestBody.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── jackson/
│ │ ├── JacksonCborConverterFactoryTest.java
│ │ └── JacksonConverterFactoryTest.java
│ ├── java8/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit/
│ │ │ └── converter/
│ │ │ └── java8/
│ │ │ ├── Java8OptionalConverterFactory.java
│ │ │ ├── OptionalConverter.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit/
│ │ └── converter/
│ │ └── java8/
│ │ ├── AlwaysNullConverterFactory.java
│ │ └── Java8OptionalConverterFactoryTest.java
│ ├── jaxb/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── jaxb/
│ │ │ ├── JaxbConverterFactory.java
│ │ │ ├── JaxbRequestConverter.java
│ │ │ ├── JaxbResponseConverter.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── jaxb/
│ │ ├── Contact.java
│ │ ├── JaxbConverterFactoryTest.java
│ │ ├── PhoneNumber.java
│ │ └── Type.java
│ ├── jaxb3/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── jaxb3/
│ │ │ ├── JaxbConverterFactory.java
│ │ │ ├── JaxbRequestConverter.java
│ │ │ ├── JaxbResponseConverter.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── jaxb3/
│ │ ├── Contact.java
│ │ ├── JaxbConverterFactoryTest.java
│ │ ├── PhoneNumber.java
│ │ └── Type.java
│ ├── kotlinx-serialization/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── kotlinx/
│ │ │ └── serialization/
│ │ │ ├── DeserializationStrategyConverter.kt
│ │ │ ├── Factory.kt
│ │ │ ├── SerializationStrategyConverter.kt
│ │ │ └── Serializer.kt
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── kotlinx/
│ │ └── serialization/
│ │ ├── KotlinSerializationConverterFactoryBytesTest.kt
│ │ ├── KotlinSerializationConverterFactoryStringTest.kt
│ │ ├── KotlinxSerializationConverterFactoryContextualListTest.kt
│ │ └── KotlinxSerializationConverterFactoryContextualTest.kt
│ ├── moshi/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── moshi/
│ │ │ ├── MoshiConverterFactory.java
│ │ │ ├── MoshiRequestBodyConverter.java
│ │ │ ├── MoshiResponseBodyConverter.java
│ │ │ ├── MoshiStreamingRequestBody.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── moshi/
│ │ └── MoshiConverterFactoryTest.java
│ ├── protobuf/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── retrofit2/
│ │ │ │ └── converter/
│ │ │ │ └── protobuf/
│ │ │ │ ├── ProtoConverterFactory.java
│ │ │ │ ├── ProtoRequestBodyConverter.java
│ │ │ │ ├── ProtoResponseBodyConverter.java
│ │ │ │ ├── ProtoStreamingRequestBody.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── proguard/
│ │ │ └── retrofit2-protobuf-converter.pro
│ │ └── test/
│ │ ├── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── protobuf/
│ │ │ ├── FallbackParserFinderTest.java
│ │ │ └── ProtoConverterFactoryTest.java
│ │ └── proto/
│ │ └── phone.proto
│ ├── scalars/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── scalars/
│ │ │ ├── ScalarRequestBodyConverter.java
│ │ │ ├── ScalarResponseBodyConverters.java
│ │ │ ├── ScalarsConverterFactory.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── scalars/
│ │ ├── ScalarsConverterFactoryTest.java
│ │ └── ScalarsConverterPrimitivesFactoryTest.java
│ ├── simplexml/
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── simplexml/
│ │ │ ├── SimpleXmlConverterFactory.java
│ │ │ ├── SimpleXmlRequestBodyConverter.java
│ │ │ ├── SimpleXmlResponseBodyConverter.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── converter/
│ │ └── simplexml/
│ │ ├── MyObject.java
│ │ └── SimpleXmlConverterFactoryTest.java
│ └── wire/
│ ├── README.md
│ ├── build.gradle
│ ├── gradle.properties
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── retrofit2/
│ │ │ └── converter/
│ │ │ └── wire/
│ │ │ ├── WireConverterFactory.java
│ │ │ ├── WireRequestBodyConverter.java
│ │ │ ├── WireResponseBodyConverter.java
│ │ │ ├── WireStreamingRequestBody.java
│ │ │ └── package-info.java
│ │ └── resources/
│ │ └── META-INF/
│ │ └── proguard/
│ │ └── retrofit2-wire-converter.pro
│ └── test/
│ └── java/
│ └── retrofit2/
│ └── converter/
│ └── wire/
│ ├── CrashingPhone.java
│ ├── Phone.java
│ └── WireConverterFactoryTest.java
├── retrofit-mock/
│ ├── README.md
│ ├── build.gradle
│ ├── gradle.properties
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── retrofit2/
│ │ └── mock/
│ │ ├── BehaviorCall.java
│ │ ├── BehaviorDelegate.java
│ │ ├── Calls.java
│ │ ├── KotlinExtensions.kt
│ │ ├── MockRetrofit.java
│ │ ├── MockRetrofitIOException.java
│ │ ├── NetworkBehavior.java
│ │ └── package-info.java
│ └── test/
│ └── java/
│ └── retrofit2/
│ └── mock/
│ ├── BehaviorDelegateKotlinTest.kt
│ ├── BehaviorDelegateTest.java
│ ├── CallsTest.java
│ ├── MockRetrofitTest.java
│ └── NetworkBehaviorTest.java
├── retrofit-response-type-keeper/
│ ├── README.md
│ ├── build.gradle
│ ├── gradle.properties
│ └── src/
│ ├── main/
│ │ ├── kotlin/
│ │ │ └── retrofit2/
│ │ │ └── keeper/
│ │ │ └── RetrofitResponseTypeKeepProcessor.kt
│ │ └── resources/
│ │ └── META-INF/
│ │ ├── gradle/
│ │ │ └── incremental.annotation.processors
│ │ └── services/
│ │ └── javax.annotation.processing.Processor
│ └── test/
│ └── kotlin/
│ └── retrofit2/
│ └── keeper/
│ └── RetrofitResponseTypeKeepProcessorTest.kt
├── samples/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── example/
│ └── retrofit/
│ ├── AnnotatedConverters.java
│ ├── ChunkingConverter.java
│ ├── ConditionalLoggingInterceptor.kt
│ ├── Crawler.java
│ ├── DeserializeErrorBody.java
│ ├── DynamicBaseUrl.java
│ ├── ErrorHandlingAdapter.java
│ ├── InvocationMetrics.java
│ ├── JsonAndXmlConverters.java
│ ├── JsonQueryParameters.java
│ ├── RxJavaObserveOnMainThread.java
│ ├── SimpleMockService.java
│ ├── SimpleService.java
│ └── package-info.java
├── settings.gradle
└── website/
├── .gitignore
├── README.md
├── astro.config.mjs
├── package.json
├── public/
│ ├── 1.x/
│ │ ├── converter-jackson/
│ │ │ ├── allclasses-frame.html
│ │ │ ├── allclasses-noframe.html
│ │ │ ├── constant-values.html
│ │ │ ├── deprecated-list.html
│ │ │ ├── help-doc.html
│ │ │ ├── index-all.html
│ │ │ ├── index.html
│ │ │ ├── overview-tree.html
│ │ │ ├── package-list
│ │ │ ├── retrofit/
│ │ │ │ └── converter/
│ │ │ │ ├── JacksonConverter.html
│ │ │ │ ├── class-use/
│ │ │ │ │ └── JacksonConverter.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ ├── script.js
│ │ │ ├── stylesheet.css
│ │ │ └── version.txt
│ │ ├── converter-protobuf/
│ │ │ ├── allclasses-frame.html
│ │ │ ├── allclasses-noframe.html
│ │ │ ├── constant-values.html
│ │ │ ├── deprecated-list.html
│ │ │ ├── help-doc.html
│ │ │ ├── index-all.html
│ │ │ ├── index.html
│ │ │ ├── overview-tree.html
│ │ │ ├── package-list
│ │ │ ├── retrofit/
│ │ │ │ └── converter/
│ │ │ │ ├── ProtoConverter.html
│ │ │ │ ├── class-use/
│ │ │ │ │ └── ProtoConverter.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ ├── script.js
│ │ │ ├── stylesheet.css
│ │ │ └── version.txt
│ │ ├── converter-simplexml/
│ │ │ ├── allclasses-frame.html
│ │ │ ├── allclasses-noframe.html
│ │ │ ├── constant-values.html
│ │ │ ├── deprecated-list.html
│ │ │ ├── help-doc.html
│ │ │ ├── index-all.html
│ │ │ ├── index.html
│ │ │ ├── overview-tree.html
│ │ │ ├── package-list
│ │ │ ├── retrofit/
│ │ │ │ └── converter/
│ │ │ │ ├── SimpleXMLConverter.html
│ │ │ │ ├── class-use/
│ │ │ │ │ └── SimpleXMLConverter.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ ├── script.js
│ │ │ ├── stylesheet.css
│ │ │ └── version.txt
│ │ ├── converter-wire/
│ │ │ ├── allclasses-frame.html
│ │ │ ├── allclasses-noframe.html
│ │ │ ├── constant-values.html
│ │ │ ├── deprecated-list.html
│ │ │ ├── help-doc.html
│ │ │ ├── index-all.html
│ │ │ ├── index.html
│ │ │ ├── overview-tree.html
│ │ │ ├── package-list
│ │ │ ├── retrofit/
│ │ │ │ └── converter/
│ │ │ │ ├── WireConverter.html
│ │ │ │ ├── class-use/
│ │ │ │ │ └── WireConverter.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ ├── script.js
│ │ │ ├── stylesheet.css
│ │ │ └── version.txt
│ │ ├── retrofit/
│ │ │ ├── allclasses-frame.html
│ │ │ ├── allclasses-noframe.html
│ │ │ ├── constant-values.html
│ │ │ ├── deprecated-list.html
│ │ │ ├── help-doc.html
│ │ │ ├── index-all.html
│ │ │ ├── index.html
│ │ │ ├── overview-frame.html
│ │ │ ├── overview-summary.html
│ │ │ ├── overview-tree.html
│ │ │ ├── package-list
│ │ │ ├── retrofit/
│ │ │ │ ├── Callback.html
│ │ │ │ ├── Endpoint.html
│ │ │ │ ├── Endpoints.html
│ │ │ │ ├── ErrorHandler.html
│ │ │ │ ├── Profiler.RequestInformation.html
│ │ │ │ ├── Profiler.html
│ │ │ │ ├── RequestInterceptor.RequestFacade.html
│ │ │ │ ├── RequestInterceptor.html
│ │ │ │ ├── ResponseCallback.html
│ │ │ │ ├── RestAdapter.Builder.html
│ │ │ │ ├── RestAdapter.Log.html
│ │ │ │ ├── RestAdapter.LogLevel.html
│ │ │ │ ├── RestAdapter.html
│ │ │ │ ├── RetrofitError.Kind.html
│ │ │ │ ├── RetrofitError.html
│ │ │ │ ├── android/
│ │ │ │ │ ├── AndroidApacheClient.html
│ │ │ │ │ ├── AndroidLog.html
│ │ │ │ │ ├── MainThreadExecutor.html
│ │ │ │ │ ├── class-use/
│ │ │ │ │ │ ├── AndroidApacheClient.html
│ │ │ │ │ │ ├── AndroidLog.html
│ │ │ │ │ │ └── MainThreadExecutor.html
│ │ │ │ │ ├── package-frame.html
│ │ │ │ │ ├── package-summary.html
│ │ │ │ │ ├── package-tree.html
│ │ │ │ │ └── package-use.html
│ │ │ │ ├── appengine/
│ │ │ │ │ ├── UrlFetchClient.html
│ │ │ │ │ ├── class-use/
│ │ │ │ │ │ └── UrlFetchClient.html
│ │ │ │ │ ├── package-frame.html
│ │ │ │ │ ├── package-summary.html
│ │ │ │ │ ├── package-tree.html
│ │ │ │ │ └── package-use.html
│ │ │ │ ├── class-use/
│ │ │ │ │ ├── Callback.html
│ │ │ │ │ ├── Endpoint.html
│ │ │ │ │ ├── Endpoints.html
│ │ │ │ │ ├── ErrorHandler.html
│ │ │ │ │ ├── Profiler.RequestInformation.html
│ │ │ │ │ ├── Profiler.html
│ │ │ │ │ ├── RequestInterceptor.RequestFacade.html
│ │ │ │ │ ├── RequestInterceptor.html
│ │ │ │ │ ├── ResponseCallback.html
│ │ │ │ │ ├── RestAdapter.Builder.html
│ │ │ │ │ ├── RestAdapter.Log.html
│ │ │ │ │ ├── RestAdapter.LogLevel.html
│ │ │ │ │ ├── RestAdapter.html
│ │ │ │ │ ├── RetrofitError.Kind.html
│ │ │ │ │ └── RetrofitError.html
│ │ │ │ ├── client/
│ │ │ │ │ ├── ApacheClient.html
│ │ │ │ │ ├── Client.Provider.html
│ │ │ │ │ ├── Client.html
│ │ │ │ │ ├── Header.html
│ │ │ │ │ ├── OkClient.html
│ │ │ │ │ ├── Request.html
│ │ │ │ │ ├── Response.html
│ │ │ │ │ ├── UrlConnectionClient.html
│ │ │ │ │ ├── class-use/
│ │ │ │ │ │ ├── ApacheClient.html
│ │ │ │ │ │ ├── Client.Provider.html
│ │ │ │ │ │ ├── Client.html
│ │ │ │ │ │ ├── Header.html
│ │ │ │ │ │ ├── OkClient.html
│ │ │ │ │ │ ├── Request.html
│ │ │ │ │ │ ├── Response.html
│ │ │ │ │ │ └── UrlConnectionClient.html
│ │ │ │ │ ├── package-frame.html
│ │ │ │ │ ├── package-summary.html
│ │ │ │ │ ├── package-tree.html
│ │ │ │ │ └── package-use.html
│ │ │ │ ├── converter/
│ │ │ │ │ ├── ConversionException.html
│ │ │ │ │ ├── Converter.html
│ │ │ │ │ ├── GsonConverter.html
│ │ │ │ │ ├── class-use/
│ │ │ │ │ │ ├── ConversionException.html
│ │ │ │ │ │ ├── Converter.html
│ │ │ │ │ │ └── GsonConverter.html
│ │ │ │ │ ├── package-frame.html
│ │ │ │ │ ├── package-summary.html
│ │ │ │ │ ├── package-tree.html
│ │ │ │ │ └── package-use.html
│ │ │ │ ├── http/
│ │ │ │ │ ├── Body.html
│ │ │ │ │ ├── DELETE.html
│ │ │ │ │ ├── EncodedPath.html
│ │ │ │ │ ├── EncodedQuery.html
│ │ │ │ │ ├── EncodedQueryMap.html
│ │ │ │ │ ├── Field.html
│ │ │ │ │ ├── FieldMap.html
│ │ │ │ │ ├── FormUrlEncoded.html
│ │ │ │ │ ├── GET.html
│ │ │ │ │ ├── HEAD.html
│ │ │ │ │ ├── Header.html
│ │ │ │ │ ├── Headers.html
│ │ │ │ │ ├── Multipart.html
│ │ │ │ │ ├── PATCH.html
│ │ │ │ │ ├── POST.html
│ │ │ │ │ ├── PUT.html
│ │ │ │ │ ├── Part.html
│ │ │ │ │ ├── PartMap.html
│ │ │ │ │ ├── Path.html
│ │ │ │ │ ├── Query.html
│ │ │ │ │ ├── QueryMap.html
│ │ │ │ │ ├── RestMethod.html
│ │ │ │ │ ├── Streaming.html
│ │ │ │ │ ├── class-use/
│ │ │ │ │ │ ├── Body.html
│ │ │ │ │ │ ├── DELETE.html
│ │ │ │ │ │ ├── EncodedPath.html
│ │ │ │ │ │ ├── EncodedQuery.html
│ │ │ │ │ │ ├── EncodedQueryMap.html
│ │ │ │ │ │ ├── Field.html
│ │ │ │ │ │ ├── FieldMap.html
│ │ │ │ │ │ ├── FormUrlEncoded.html
│ │ │ │ │ │ ├── GET.html
│ │ │ │ │ │ ├── HEAD.html
│ │ │ │ │ │ ├── Header.html
│ │ │ │ │ │ ├── Headers.html
│ │ │ │ │ │ ├── Multipart.html
│ │ │ │ │ │ ├── PATCH.html
│ │ │ │ │ │ ├── POST.html
│ │ │ │ │ │ ├── PUT.html
│ │ │ │ │ │ ├── Part.html
│ │ │ │ │ │ ├── PartMap.html
│ │ │ │ │ │ ├── Path.html
│ │ │ │ │ │ ├── Query.html
│ │ │ │ │ │ ├── QueryMap.html
│ │ │ │ │ │ ├── RestMethod.html
│ │ │ │ │ │ └── Streaming.html
│ │ │ │ │ ├── package-frame.html
│ │ │ │ │ ├── package-summary.html
│ │ │ │ │ ├── package-tree.html
│ │ │ │ │ └── package-use.html
│ │ │ │ ├── mime/
│ │ │ │ │ ├── FormUrlEncodedTypedOutput.html
│ │ │ │ │ ├── MimeUtil.html
│ │ │ │ │ ├── MultipartTypedOutput.html
│ │ │ │ │ ├── TypedByteArray.html
│ │ │ │ │ ├── TypedFile.html
│ │ │ │ │ ├── TypedInput.html
│ │ │ │ │ ├── TypedOutput.html
│ │ │ │ │ ├── TypedString.html
│ │ │ │ │ ├── class-use/
│ │ │ │ │ │ ├── FormUrlEncodedTypedOutput.html
│ │ │ │ │ │ ├── MimeUtil.html
│ │ │ │ │ │ ├── MultipartTypedOutput.html
│ │ │ │ │ │ ├── TypedByteArray.html
│ │ │ │ │ │ ├── TypedFile.html
│ │ │ │ │ │ ├── TypedInput.html
│ │ │ │ │ │ ├── TypedOutput.html
│ │ │ │ │ │ └── TypedString.html
│ │ │ │ │ ├── package-frame.html
│ │ │ │ │ ├── package-summary.html
│ │ │ │ │ ├── package-tree.html
│ │ │ │ │ └── package-use.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ ├── script.js
│ │ │ ├── serialized-form.html
│ │ │ ├── stylesheet.css
│ │ │ └── version.txt
│ │ └── retrofit-mock/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-frame.html
│ │ ├── overview-summary.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit/
│ │ │ ├── MockHttpException.html
│ │ │ ├── MockRestAdapter.ValueChangeListener.html
│ │ │ ├── MockRestAdapter.html
│ │ │ ├── android/
│ │ │ │ ├── AndroidMockValuePersistence.html
│ │ │ │ ├── class-use/
│ │ │ │ │ └── AndroidMockValuePersistence.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ ├── package-tree.html
│ │ │ │ └── package-use.html
│ │ │ ├── class-use/
│ │ │ │ ├── MockHttpException.html
│ │ │ │ ├── MockRestAdapter.ValueChangeListener.html
│ │ │ │ └── MockRestAdapter.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ ├── package-tree.html
│ │ │ └── package-use.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ ├── stylesheet.css
│ │ └── version.txt
│ └── 2.x/
│ ├── adapter-guava/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── adapter/
│ │ │ └── guava/
│ │ │ ├── GuavaCallAdapterFactory.html
│ │ │ ├── HttpException.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ └── stylesheet.css
│ ├── adapter-java8/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── adapter/
│ │ │ └── java8/
│ │ │ ├── HttpException.html
│ │ │ ├── Java8CallAdapterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ └── stylesheet.css
│ ├── adapter-rxjava/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── adapter/
│ │ │ └── rxjava/
│ │ │ ├── HttpException.html
│ │ │ ├── Result.html
│ │ │ ├── RxJavaCallAdapterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ └── stylesheet.css
│ ├── adapter-rxjava2/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── adapter/
│ │ │ └── rxjava2/
│ │ │ ├── HttpException.html
│ │ │ ├── Result.html
│ │ │ ├── RxJava2CallAdapterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ └── stylesheet.css
│ ├── adapter-rxjava3/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── adapter/
│ │ │ └── rxjava3/
│ │ │ ├── HttpException.html
│ │ │ ├── Result.html
│ │ │ ├── RxJava3CallAdapterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ └── stylesheet.css
│ ├── adapter-scala/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── adapter/
│ │ │ └── scala/
│ │ │ ├── ScalaCallAdapterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-gson/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── gson/
│ │ │ ├── GsonConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-guava/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit/
│ │ │ └── converter/
│ │ │ └── guava/
│ │ │ ├── GuavaOptionalConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-jackson/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── jackson/
│ │ │ ├── JacksonConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-java8/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit/
│ │ │ └── converter/
│ │ │ └── java8/
│ │ │ ├── Java8OptionalConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-jaxb/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── jaxb/
│ │ │ ├── JaxbConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-jaxb3/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── jaxb3/
│ │ │ ├── JaxbConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-kotlinx-serialization/
│ │ ├── index.html
│ │ ├── kotlinx-serialization/
│ │ │ ├── package-list
│ │ │ └── retrofit2.converter.kotlinx.serialization/
│ │ │ ├── as-converter-factory.html
│ │ │ └── index.html
│ │ ├── navigation.html
│ │ ├── scripts/
│ │ │ ├── clipboard.js
│ │ │ ├── main.js
│ │ │ ├── navigation-loader.js
│ │ │ ├── pages.json
│ │ │ ├── platform-content-handler.js
│ │ │ ├── prism.js
│ │ │ ├── sourceset_dependencies.js
│ │ │ └── symbol-parameters-wrapper_deferred.js
│ │ └── styles/
│ │ ├── font-jb-sans-auto.css
│ │ ├── logo-styles.css
│ │ ├── main.css
│ │ ├── prism.css
│ │ └── style.css
│ ├── converter-moshi/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── moshi/
│ │ │ ├── MoshiConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-protobuf/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── protobuf/
│ │ │ ├── ProtoConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-scalars/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── scalars/
│ │ │ ├── ScalarsConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-simplexml/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── simplexml/
│ │ │ ├── SimpleXmlConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── converter-wire/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ └── converter/
│ │ │ └── wire/
│ │ │ ├── WireConverterFactory.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ └── stylesheet.css
│ ├── retrofit/
│ │ ├── allclasses-frame.html
│ │ ├── allclasses-noframe.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── help-doc.html
│ │ ├── index-all.html
│ │ ├── index.html
│ │ ├── overview-frame.html
│ │ ├── overview-summary.html
│ │ ├── overview-tree.html
│ │ ├── package-list
│ │ ├── retrofit2/
│ │ │ ├── Call.html
│ │ │ ├── CallAdapter.Factory.html
│ │ │ ├── CallAdapter.html
│ │ │ ├── Callback.html
│ │ │ ├── Converter.Factory.html
│ │ │ ├── Converter.html
│ │ │ ├── HttpException.html
│ │ │ ├── Invocation.html
│ │ │ ├── OptionalConverterFactory.html
│ │ │ ├── Response.html
│ │ │ ├── Retrofit.Builder.html
│ │ │ ├── Retrofit.html
│ │ │ ├── SkipCallbackExecutor.html
│ │ │ ├── http/
│ │ │ │ ├── Body.html
│ │ │ │ ├── DELETE.html
│ │ │ │ ├── Field.html
│ │ │ │ ├── FieldMap.html
│ │ │ │ ├── FormUrlEncoded.html
│ │ │ │ ├── GET.html
│ │ │ │ ├── HEAD.html
│ │ │ │ ├── HTTP.html
│ │ │ │ ├── Header.html
│ │ │ │ ├── HeaderMap.html
│ │ │ │ ├── Headers.html
│ │ │ │ ├── Multipart.html
│ │ │ │ ├── OPTIONS.html
│ │ │ │ ├── PATCH.html
│ │ │ │ ├── POST.html
│ │ │ │ ├── PUT.html
│ │ │ │ ├── Part.html
│ │ │ │ ├── PartMap.html
│ │ │ │ ├── Path.html
│ │ │ │ ├── Query.html
│ │ │ │ ├── QueryMap.html
│ │ │ │ ├── QueryName.html
│ │ │ │ ├── Streaming.html
│ │ │ │ ├── Tag.html
│ │ │ │ ├── Url.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ └── package-tree.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── script.js
│ │ ├── serialized-form.html
│ │ └── stylesheet.css
│ └── retrofit-mock/
│ ├── allclasses-frame.html
│ ├── allclasses-noframe.html
│ ├── constant-values.html
│ ├── deprecated-list.html
│ ├── help-doc.html
│ ├── index-all.html
│ ├── index.html
│ ├── overview-tree.html
│ ├── package-list
│ ├── retrofit2/
│ │ └── mock/
│ │ ├── BehaviorDelegate.html
│ │ ├── Calls.html
│ │ ├── MockRetrofit.Builder.html
│ │ ├── MockRetrofit.html
│ │ ├── NetworkBehavior.html
│ │ ├── package-frame.html
│ │ ├── package-summary.html
│ │ └── package-tree.html
│ ├── script.js
│ └── stylesheet.css
├── src/
│ ├── content/
│ │ └── docs/
│ │ ├── configuration.md
│ │ ├── contributing.md
│ │ ├── declarations.md
│ │ ├── download.mdx
│ │ └── index.md
│ ├── content.config.ts
│ └── styles/
│ └── theme.css
└── tsconfig.json
Showing preview only (302K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3796 symbols across 287 files)
FILE: retrofit-adapters/guava/src/main/java/retrofit2/adapter/guava/GuavaCallAdapterFactory.java
class GuavaCallAdapterFactory (line 54) | public final class GuavaCallAdapterFactory extends CallAdapter.Factory {
method create (line 55) | public static GuavaCallAdapterFactory create() {
method GuavaCallAdapterFactory (line 59) | private GuavaCallAdapterFactory() {}
method get (line 61) | @Override
class BodyCallAdapter (line 88) | private static final class BodyCallAdapter<R> implements CallAdapter<R...
method BodyCallAdapter (line 91) | BodyCallAdapter(Type responseType) {
method responseType (line 95) | @Override
method adapt (line 100) | @Override
class ResponseCallAdapter (line 125) | private static final class ResponseCallAdapter<R>
method ResponseCallAdapter (line 129) | ResponseCallAdapter(Type responseType) {
method responseType (line 133) | @Override
method adapt (line 138) | @Override
class CallCancelListenableFuture (line 159) | private static final class CallCancelListenableFuture<T> extends Abstr...
method CallCancelListenableFuture (line 162) | CallCancelListenableFuture(Call<?> call) {
method set (line 166) | @Override
method setException (line 171) | @Override
method interruptTask (line 176) | @Override
FILE: retrofit-adapters/guava/src/main/java/retrofit2/adapter/guava/HttpException.java
class HttpException (line 21) | @Deprecated
method HttpException (line 23) | public HttpException(Response<?> response) {
FILE: retrofit-adapters/guava/src/test/java/retrofit2/adapter/guava/GuavaCallAdapterFactoryTest.java
class GuavaCallAdapterFactoryTest (line 34) | public final class GuavaCallAdapterFactoryTest {
method setUp (line 42) | @Before
method responseType (line 52) | @Test
method nonListenableFutureReturnsNull (line 79) | @Test
method rawTypeThrows (line 85) | @Test
method rawResponseTypeThrows (line 99) | @Test
FILE: retrofit-adapters/guava/src/test/java/retrofit2/adapter/guava/ListenableFutureTest.java
class ListenableFutureTest (line 34) | public final class ListenableFutureTest {
type Service (line 37) | interface Service {
method body (line 38) | @GET("/")
method response (line 41) | @GET("/")
method setUp (line 47) | @Before
method bodySuccess200 (line 58) | @Test
method bodySuccess404 (line 66) | @Test
method bodyFailure (line 82) | @Test
method responseSuccess200 (line 95) | @Test
method responseSuccess404 (line 105) | @Test
method responseFailure (line 115) | @Test
FILE: retrofit-adapters/guava/src/test/java/retrofit2/adapter/guava/StringConverterFactory.java
class StringConverterFactory (line 26) | final class StringConverterFactory extends Converter.Factory {
method responseBodyConverter (line 27) | @Override
method requestBodyConverter (line 33) | @Override
FILE: retrofit-adapters/java8/src/main/java/retrofit2/adapter/java8/HttpException.java
class HttpException (line 21) | @Deprecated
method HttpException (line 23) | public HttpException(Response<?> response) {
FILE: retrofit-adapters/java8/src/main/java/retrofit2/adapter/java8/Java8CallAdapterFactory.java
class Java8CallAdapterFactory (line 52) | @Deprecated
method create (line 54) | public static Java8CallAdapterFactory create() {
method Java8CallAdapterFactory (line 58) | private Java8CallAdapterFactory() {}
method get (line 60) | @Override
class BodyCallAdapter (line 87) | private static final class BodyCallAdapter<R> implements CallAdapter<R...
method BodyCallAdapter (line 90) | BodyCallAdapter(Type responseType) {
method responseType (line 94) | @Override
method adapt (line 99) | @Override
class ResponseCallAdapter (line 133) | private static final class ResponseCallAdapter<R>
method ResponseCallAdapter (line 137) | ResponseCallAdapter(Type responseType) {
method responseType (line 141) | @Override
method adapt (line 146) | @Override
FILE: retrofit-adapters/java8/src/test/java/retrofit2/adapter/java8/CompletableFutureTest.java
class CompletableFutureTest (line 34) | public final class CompletableFutureTest {
type Service (line 37) | interface Service {
method body (line 38) | @GET("/")
method response (line 41) | @GET("/")
method setUp (line 47) | @Before
method bodySuccess200 (line 58) | @Test
method bodySuccess404 (line 66) | @Test
method bodyFailure (line 82) | @Test
method responseSuccess200 (line 95) | @Test
method responseSuccess404 (line 105) | @Test
method responseFailure (line 115) | @Test
FILE: retrofit-adapters/java8/src/test/java/retrofit2/adapter/java8/Java8CallAdapterFactoryTest.java
class Java8CallAdapterFactoryTest (line 34) | public final class Java8CallAdapterFactoryTest {
method setUp (line 42) | @Before
method responseType (line 52) | @Test
method nonListenableFutureReturnsNull (line 79) | @Test
method rawTypeThrows (line 85) | @Test
method rawResponseTypeThrows (line 99) | @Test
FILE: retrofit-adapters/java8/src/test/java/retrofit2/adapter/java8/StringConverterFactory.java
class StringConverterFactory (line 26) | final class StringConverterFactory extends Converter.Factory {
method responseBodyConverter (line 27) | @Override
method requestBodyConverter (line 33) | @Override
FILE: retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/BodyOnSubscribe.java
class BodyOnSubscribe (line 28) | final class BodyOnSubscribe<T> implements OnSubscribe<T> {
method BodyOnSubscribe (line 31) | BodyOnSubscribe(OnSubscribe<Response<T>> upstream) {
method call (line 35) | @Override
class BodySubscriber (line 40) | private static class BodySubscriber<R> extends Subscriber<Response<R>> {
method BodySubscriber (line 46) | BodySubscriber(Subscriber<? super R> subscriber) {
method onNext (line 51) | @Override
method onError (line 72) | @Override
method onCompleted (line 87) | @Override
FILE: retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/CallArbiter.java
class CallArbiter (line 31) | final class CallArbiter<T> extends AtomicInteger implements Subscription...
method CallArbiter (line 43) | CallArbiter(Call<T> call, Subscriber<? super Response<T>> subscriber) {
method unsubscribe (line 50) | @Override
method isUnsubscribed (line 56) | @Override
method request (line 61) | @Override
method emitResponse (line 92) | void emitResponse(Response<T> response) {
method deliverResponse (line 120) | private void deliverResponse(Response<T> response) {
method emitError (line 159) | void emitError(Throwable t) {
FILE: retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/CallEnqueueOnSubscribe.java
class CallEnqueueOnSubscribe (line 25) | final class CallEnqueueOnSubscribe<T> implements OnSubscribe<Response<T>> {
method CallEnqueueOnSubscribe (line 28) | CallEnqueueOnSubscribe(Call<T> originalCall) {
method call (line 32) | @Override
FILE: retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/CallExecuteOnSubscribe.java
class CallExecuteOnSubscribe (line 24) | final class CallExecuteOnSubscribe<T> implements OnSubscribe<Response<T>> {
method CallExecuteOnSubscribe (line 27) | CallExecuteOnSubscribe(Call<T> originalCall) {
method call (line 31) | @Override
FILE: retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/HttpException.java
class HttpException (line 6) | @Deprecated
method HttpException (line 8) | public HttpException(Response<?> response) {
FILE: retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/Result.java
class Result (line 23) | public final class Result<T> {
method error (line 24) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method response (line 30) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method Result (line 39) | private Result(@Nullable Response<T> response, @Nullable Throwable err...
method response (line 48) | public @Nullable Response<T> response() {
method error (line 60) | public @Nullable Throwable error() {
method isError (line 65) | public boolean isError() {
method toString (line 69) | @Override
FILE: retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/ResultOnSubscribe.java
class ResultOnSubscribe (line 28) | final class ResultOnSubscribe<T> implements OnSubscribe<Result<T>> {
method ResultOnSubscribe (line 31) | ResultOnSubscribe(OnSubscribe<Response<T>> upstream) {
method call (line 35) | @Override
class ResultSubscriber (line 40) | private static class ResultSubscriber<R> extends Subscriber<Response<R...
method ResultSubscriber (line 43) | ResultSubscriber(Subscriber<? super Result<R>> subscriber) {
method onNext (line 48) | @Override
method onError (line 53) | @Override
method onCompleted (line 74) | @Override
FILE: retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/RxJavaCallAdapter.java
class RxJavaCallAdapter (line 27) | final class RxJavaCallAdapter<R> implements CallAdapter<R, Object> {
method RxJavaCallAdapter (line 36) | RxJavaCallAdapter(
method responseType (line 53) | @Override
method adapt (line 58) | @Override
FILE: retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/RxJavaCallAdapterFactory.java
class RxJavaCallAdapterFactory (line 63) | public final class RxJavaCallAdapterFactory extends CallAdapter.Factory {
method create (line 68) | public static RxJavaCallAdapterFactory create() {
method createAsync (line 73) | public static RxJavaCallAdapterFactory createAsync() {
method createWithScheduler (line 81) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method RxJavaCallAdapterFactory (line 90) | private RxJavaCallAdapterFactory(@Nullable Scheduler scheduler, boolea...
method get (line 95) | @Override
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/AsyncTest.java
class AsyncTest (line 44) | public final class AsyncTest {
type Service (line 48) | interface Service {
method completable (line 49) | @GET("/")
method setUp (line 55) | @Before
method success (line 65) | @Test
method failure (line 76) | @Test
method throwingInOnCompleteDeliveredToPlugin (line 87) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 126) | @Test
method bodyThrowingInOnSafeSubscriberErrorDeliveredToPlugin (line 168) | @Test
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/CancelDisposeTest.java
class CancelDisposeTest (line 34) | public final class CancelDisposeTest {
type Service (line 37) | interface Service {
method go (line 38) | @GET("/")
method setUp (line 45) | @Before
method disposeCancelsCall (line 57) | @Test
method cancelDoesNotDispose (line 66) | @Test
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/CompletableTest.java
class CompletableTest (line 31) | public final class CompletableTest {
type Service (line 36) | interface Service {
method completable (line 37) | @GET("/")
method setUp (line 43) | @Before
method completableSuccess200 (line 53) | @Test
method completableSuccess404 (line 62) | @Test
method completableFailure (line 72) | @Test
method subscribeTwice (line 81) | @Test
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/CompletableThrowingSafeSubscriberTest.java
class CompletableThrowingSafeSubscriberTest (line 39) | public final class CompletableThrowingSafeSubscriberTest {
type Service (line 44) | interface Service {
method completable (line 45) | @GET("/")
method setUp (line 51) | @Before
method throwingInOnCompleteDeliveredToPlugin (line 61) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 94) | @Test
class ForwardingCompletableObserver (line 130) | abstract static class ForwardingCompletableObserver implements Complet...
method ForwardingCompletableObserver (line 133) | ForwardingCompletableObserver(RecordingSubscriber<Void> delegate) {
method onSubscribe (line 137) | @Override
method onCompleted (line 140) | @Override
method onError (line 145) | @Override
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/CompletableThrowingTest.java
class CompletableThrowingTest (line 37) | public final class CompletableThrowingTest {
type Service (line 42) | interface Service {
method completable (line 43) | @GET("/")
method setUp (line 49) | @Before
method throwingInOnCompleteDeliveredToPlugin (line 59) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 90) | @Test
class ForwardingCompletableObserver (line 124) | abstract static class ForwardingCompletableObserver implements Complet...
method ForwardingCompletableObserver (line 127) | ForwardingCompletableObserver(RecordingSubscriber<Void> delegate) {
method onSubscribe (line 131) | @Override
method onCompleted (line 134) | @Override
method onError (line 139) | @Override
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/CompletableWithSchedulerTest.java
class CompletableWithSchedulerTest (line 28) | public final class CompletableWithSchedulerTest {
type Service (line 32) | interface Service {
method completable (line 33) | @GET("/")
method setUp (line 40) | @Before
method completableUsesScheduler (line 50) | @Test
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/ForwardingSubscriber.java
class ForwardingSubscriber (line 20) | abstract class ForwardingSubscriber<T> extends Subscriber<T> {
method ForwardingSubscriber (line 23) | ForwardingSubscriber(Subscriber<T> delegate) {
method onNext (line 27) | @Override
method onCompleted (line 32) | @Override
method onError (line 37) | @Override
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/ObservableTest.java
class ObservableTest (line 33) | public final class ObservableTest {
type Service (line 38) | interface Service {
method body (line 39) | @GET("/")
method response (line 42) | @GET("/")
method result (line 45) | @GET("/")
method setUp (line 51) | @Before
method bodySuccess200 (line 62) | @Test
method bodySuccess404 (line 71) | @Test
method bodyFailure (line 81) | @Test
method bodyRespectsBackpressure (line 90) | @Test
method responseSuccess200 (line 106) | @Test
method responseSuccess404 (line 116) | @Test
method responseFailure (line 126) | @Test
method responseRespectsBackpressure (line 135) | @Test
method responseUnsubscribedDoesNotCallCompleted (line 151) | @Test
method resultSuccess200 (line 161) | @Test
method resultSuccess404 (line 171) | @Test
method resultFailure (line 181) | @Test
method resultRespectsBackpressure (line 191) | @Test
method subscribeTwice (line 207) | @Test
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/ObservableThrowingSafeSubscriberTest.java
class ObservableThrowingSafeSubscriberTest (line 39) | public final class ObservableThrowingSafeSubscriberTest {
type Service (line 44) | interface Service {
method body (line 45) | @GET("/")
method response (line 48) | @GET("/")
method result (line 51) | @GET("/")
method setUp (line 57) | @Before
method bodyThrowingInOnNextDeliveredToError (line 68) | @Test
method bodyThrowingInOnCompleteDeliveredToPlugin (line 87) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 121) | @Test
method responseThrowingInOnNextDeliveredToError (line 159) | @Test
method responseThrowingInOnCompleteDeliveredToPlugin (line 178) | @Test
method responseThrowingInOnErrorDeliveredToPlugin (line 212) | @Test
method resultThrowingInOnNextDeliveredToError (line 250) | @Test
method resultThrowingInOnCompletedDeliveredToPlugin (line 269) | @Test
method resultThrowingInOnErrorDeliveredToPlugin (line 303) | @Test
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/ObservableThrowingTest.java
class ObservableThrowingTest (line 37) | public final class ObservableThrowingTest {
type Service (line 42) | interface Service {
method body (line 43) | @GET("/")
method response (line 46) | @GET("/")
method result (line 49) | @GET("/")
method setUp (line 55) | @Before
method bodyThrowingInOnNextDeliveredToError (line 66) | @Test
method bodyThrowingInOnCompleteDeliveredToPlugin (line 85) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 117) | @Test
method responseThrowingInOnNextDeliveredToError (line 153) | @Test
method responseThrowingInOnCompleteDeliveredToPlugin (line 172) | @Test
method responseThrowingInOnErrorDeliveredToPlugin (line 204) | @Test
method resultThrowingInOnNextDeliveredToError (line 240) | @Test
method resultThrowingInOnCompletedDeliveredToPlugin (line 259) | @Test
method resultThrowingInOnErrorDeliveredToPlugin (line 291) | @Test
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/ObservableWithSchedulerTest.java
class ObservableWithSchedulerTest (line 29) | public final class ObservableWithSchedulerTest {
type Service (line 33) | interface Service {
method body (line 34) | @GET("/")
method response (line 37) | @GET("/")
method result (line 40) | @GET("/")
method setUp (line 47) | @Before
method bodyUsesScheduler (line 58) | @Test
method responseUsesScheduler (line 70) | @Test
method resultUsesScheduler (line 82) | @Test
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/RecordingSubscriber.java
class RecordingSubscriber (line 32) | final class RecordingSubscriber<T> extends Subscriber<T> {
method RecordingSubscriber (line 36) | private RecordingSubscriber(long initialRequest) {
method onStart (line 40) | @Override
method onNext (line 45) | @Override
method onCompleted (line 50) | @Override
method onError (line 55) | @Override
method takeNotification (line 60) | private Notification<T> takeNotification() {
method takeValue (line 68) | public T takeValue() {
method takeError (line 76) | public Throwable takeError() {
method assertAnyValue (line 84) | public RecordingSubscriber<T> assertAnyValue() {
method assertValue (line 89) | public RecordingSubscriber<T> assertValue(T value) {
method assertCompleted (line 94) | public void assertCompleted() {
method assertError (line 102) | public void assertError(Throwable throwable) {
method assertError (line 106) | public void assertError(Class<? extends Throwable> errorClass) {
method assertError (line 110) | public void assertError(Class<? extends Throwable> errorClass, String ...
method assertNoEvents (line 119) | public void assertNoEvents() {
method requestMore (line 123) | public void requestMore(long amount) {
class Rule (line 127) | public static final class Rule implements TestRule {
method create (line 130) | public <T> RecordingSubscriber<T> create() {
method createWithInitialRequest (line 134) | public <T> RecordingSubscriber<T> createWithInitialRequest(long init...
method apply (line 140) | @Override
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/ResultTest.java
class ResultTest (line 25) | public final class ResultTest {
method response (line 26) | @Test
method nullResponseThrows (line 35) | @Test
method error (line 45) | @Test
method nullErrorThrows (line 54) | @Test
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/RxJavaCallAdapterFactoryTest.java
class RxJavaCallAdapterFactoryTest (line 33) | public final class RxJavaCallAdapterFactoryTest {
method setUp (line 39) | @Before
method nullSchedulerThrows (line 49) | @Test
method nonRxJavaTypeReturnsNull (line 59) | @Test
method responseTypes (line 65) | @Test
method rawBodyTypeThrows (line 117) | @Test
method rawResponseTypeThrows (line 142) | @Test
method rawResultTypeThrows (line 165) | @Test
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/RxJavaPluginsResetRule.java
class RxJavaPluginsResetRule (line 24) | final class RxJavaPluginsResetRule implements TestRule {
method apply (line 25) | @Override
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/SingleTest.java
class SingleTest (line 33) | public final class SingleTest {
type Service (line 38) | interface Service {
method body (line 39) | @GET("/")
method response (line 42) | @GET("/")
method result (line 45) | @GET("/")
method setUp (line 51) | @Before
method bodySuccess200 (line 62) | @Test
method bodySuccess404 (line 71) | @Test
method bodyFailure (line 81) | @Test
method bodyThrowingInOnNextDeliveredToError (line 90) | @Test
method responseSuccess200 (line 109) | @Test
method responseSuccess404 (line 119) | @Test
method responseFailure (line 129) | @Test
method responseThrowingInOnNextDeliveredToError (line 138) | @Test
method resultSuccess200 (line 157) | @Test
method resultSuccess404 (line 167) | @Test
method resultFailure (line 177) | @Test
method resultThrowingInOnNextDeliveredToError (line 187) | @Test
method subscribeTwice (line 206) | @Test
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/SingleThrowingTest.java
class SingleThrowingTest (line 40) | public final class SingleThrowingTest {
type Service (line 45) | interface Service {
method body (line 46) | @GET("/")
method response (line 49) | @GET("/")
method result (line 52) | @GET("/")
method setUp (line 58) | @Before
method bodyThrowingInOnSuccessDeliveredToPlugin (line 69) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 100) | @Test
method responseThrowingInOnSuccessDeliveredToPlugin (line 136) | @Test
method responseThrowingInOnErrorDeliveredToPlugin (line 167) | @Test
method resultThrowingInOnSuccessDeliveredToPlugin (line 203) | @Test
method resultThrowingInOnErrorDeliveredToPlugin (line 234) | @Ignore("Single's contract is onNext|onError so we have no way of trig...
class ForwardingObserver (line 274) | private abstract static class ForwardingObserver<T> extends SingleSubs...
method ForwardingObserver (line 277) | ForwardingObserver(Subscriber<T> delegate) {
method onSuccess (line 281) | @Override
method onError (line 287) | @Override
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/SingleWithSchedulerTest.java
class SingleWithSchedulerTest (line 29) | public final class SingleWithSchedulerTest {
type Service (line 33) | interface Service {
method body (line 34) | @GET("/")
method response (line 37) | @GET("/")
method result (line 40) | @GET("/")
method setUp (line 47) | @Before
method bodyUsesScheduler (line 58) | @Test
method responseUsesScheduler (line 70) | @Test
method resultUsesScheduler (line 82) | @Test
FILE: retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/StringConverterFactory.java
class StringConverterFactory (line 26) | final class StringConverterFactory extends Converter.Factory {
method responseBodyConverter (line 27) | @Override
method requestBodyConverter (line 33) | @Override
FILE: retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/BodyObservable.java
class BodyObservable (line 26) | final class BodyObservable<T> extends Observable<T> {
method BodyObservable (line 29) | BodyObservable(Observable<Response<T>> upstream) {
method subscribeActual (line 33) | @Override
class BodyObserver (line 38) | private static class BodyObserver<R> implements Observer<Response<R>> {
method BodyObserver (line 42) | BodyObserver(Observer<? super R> observer) {
method onSubscribe (line 46) | @Override
method onNext (line 51) | @Override
method onComplete (line 67) | @Override
method onError (line 74) | @Override
FILE: retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/CallEnqueueObservable.java
class CallEnqueueObservable (line 28) | final class CallEnqueueObservable<T> extends Observable<Response<T>> {
method CallEnqueueObservable (line 31) | CallEnqueueObservable(Call<T> originalCall) {
method subscribeActual (line 35) | @Override
class CallCallback (line 46) | private static final class CallCallback<T> implements Disposable, Call...
method CallCallback (line 52) | CallCallback(Call<?> call, Observer<? super Response<T>> observer) {
method onResponse (line 57) | @Override
method onFailure (line 83) | @Override
method dispose (line 95) | @Override
method isDisposed (line 101) | @Override
FILE: retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/CallExecuteObservable.java
class CallExecuteObservable (line 27) | final class CallExecuteObservable<T> extends Observable<Response<T>> {
method CallExecuteObservable (line 30) | CallExecuteObservable(Call<T> originalCall) {
method subscribeActual (line 34) | @Override
class CallDisposable (line 69) | private static final class CallDisposable implements Disposable {
method CallDisposable (line 73) | CallDisposable(Call<?> call) {
method dispose (line 77) | @Override
method isDisposed (line 83) | @Override
FILE: retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/HttpException.java
class HttpException (line 21) | @Deprecated
method HttpException (line 23) | public HttpException(Response<?> response) {
FILE: retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/Result.java
class Result (line 23) | public final class Result<T> {
method error (line 24) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method response (line 30) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method Result (line 39) | private Result(@Nullable Response<T> response, @Nullable Throwable err...
method response (line 48) | public @Nullable Response<T> response() {
method error (line 60) | public @Nullable Throwable error() {
method isError (line 65) | public boolean isError() {
FILE: retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/ResultObservable.java
class ResultObservable (line 26) | final class ResultObservable<T> extends Observable<Result<T>> {
method ResultObservable (line 29) | ResultObservable(Observable<Response<T>> upstream) {
method subscribeActual (line 33) | @Override
class ResultObserver (line 38) | private static class ResultObserver<R> implements Observer<Response<R>> {
method ResultObserver (line 41) | ResultObserver(Observer<? super Result<R>> observer) {
method onSubscribe (line 45) | @Override
method onNext (line 50) | @Override
method onError (line 55) | @Override
method onComplete (line 71) | @Override
FILE: retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/RxJava2CallAdapter.java
class RxJava2CallAdapter (line 28) | final class RxJava2CallAdapter<R> implements CallAdapter<R, Object> {
method RxJava2CallAdapter (line 39) | RxJava2CallAdapter(
method responseType (line 60) | @Override
method adapt (line 65) | @Override
FILE: retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/RxJava2CallAdapterFactory.java
class RxJava2CallAdapterFactory (line 61) | public final class RxJava2CallAdapterFactory extends CallAdapter.Factory {
method create (line 66) | public static RxJava2CallAdapterFactory create() {
method createAsync (line 71) | public static RxJava2CallAdapterFactory createAsync() {
method createWithScheduler (line 79) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method RxJava2CallAdapterFactory (line 88) | private RxJava2CallAdapterFactory(@Nullable Scheduler scheduler, boole...
method get (line 93) | @Override
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/AsyncTest.java
class AsyncTest (line 51) | public final class AsyncTest {
type Service (line 54) | interface Service {
method completable (line 55) | @GET("/")
method setUp (line 62) | @Before
method tearDown (line 83) | @After
method success (line 88) | @Test
method failure (line 99) | @Test
method throwingInOnCompleteDeliveredToPlugin (line 110) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 143) | @Test
method bodyThrowingFatalInOnErrorPropagates (line 177) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/CancelDisposeTest.java
class CancelDisposeTest (line 34) | public final class CancelDisposeTest {
type Service (line 37) | interface Service {
method go (line 38) | @GET("/")
method setUp (line 45) | @Before
method disposeCancelsCall (line 57) | @Test
method disposeBeforeEnqueueDoesNotEnqueue (line 66) | @SuppressWarnings("ResultOfMethodCallIgnored")
method cancelDoesNotDispose (line 74) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/CancelDisposeTestSync.java
class CancelDisposeTestSync (line 29) | public final class CancelDisposeTestSync {
type Service (line 32) | interface Service {
method go (line 33) | @GET("/")
method setUp (line 40) | @Before
method disposeBeforeExecuteDoesNotEnqueue (line 52) | @SuppressWarnings("ResultOfMethodCallIgnored")
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/CompletableTest.java
class CompletableTest (line 30) | public final class CompletableTest {
type Service (line 37) | interface Service {
method completable (line 38) | @GET("/")
method setUp (line 44) | @Before
method completableSuccess200 (line 54) | @Test
method completableSuccess404 (line 63) | @Test
method completableFailure (line 73) | @Test
method subscribeTwice (line 82) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/CompletableThrowingTest.java
class CompletableThrowingTest (line 37) | public final class CompletableThrowingTest {
type Service (line 45) | interface Service {
method completable (line 46) | @GET("/")
method setUp (line 52) | @Before
method throwingInOnCompleteDeliveredToPlugin (line 62) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 91) | @Test
class ForwardingCompletableObserver (line 122) | abstract static class ForwardingCompletableObserver implements Complet...
method ForwardingCompletableObserver (line 125) | ForwardingCompletableObserver(CompletableObserver delegate) {
method onSubscribe (line 129) | @Override
method onComplete (line 134) | @Override
method onError (line 139) | @Override
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/CompletableWithSchedulerTest.java
class CompletableWithSchedulerTest (line 28) | public final class CompletableWithSchedulerTest {
type Service (line 35) | interface Service {
method completable (line 36) | @GET("/")
method setUp (line 43) | @Before
method completableUsesScheduler (line 53) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/FlowableTest.java
class FlowableTest (line 32) | public final class FlowableTest {
type Service (line 36) | interface Service {
method body (line 37) | @GET("/")
method response (line 40) | @GET("/")
method result (line 43) | @GET("/")
method setUp (line 49) | @Before
method bodySuccess200 (line 60) | @Test
method bodySuccess404 (line 69) | @Test
method bodyFailure (line 79) | @Test
method responseSuccess200 (line 88) | @Test
method responseSuccess404 (line 98) | @Test
method responseFailure (line 108) | @Test
method resultSuccess200 (line 117) | @Test
method resultSuccess404 (line 129) | @Test
method resultFailure (line 141) | @Test
method subscribeTwice (line 153) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/FlowableThrowingTest.java
class FlowableThrowingTest (line 39) | public final class FlowableThrowingTest {
type Service (line 44) | interface Service {
method body (line 45) | @GET("/")
method response (line 48) | @GET("/")
method result (line 51) | @GET("/")
method setUp (line 57) | @Before
method bodyThrowingInOnNextDeliveredToError (line 68) | @Test
method bodyThrowingInOnCompleteDeliveredToPlugin (line 87) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 118) | @Test
method responseThrowingInOnNextDeliveredToError (line 151) | @Test
method responseThrowingInOnCompleteDeliveredToPlugin (line 170) | @Test
method responseThrowingInOnErrorDeliveredToPlugin (line 201) | @Test
method resultThrowingInOnNextDeliveredToError (line 234) | @Test
method resultThrowingInOnCompletedDeliveredToPlugin (line 253) | @Test
method resultThrowingInOnErrorDeliveredToPlugin (line 284) | @Test
class ForwardingSubscriber (line 320) | private abstract static class ForwardingSubscriber<T> implements Subsc...
method ForwardingSubscriber (line 323) | ForwardingSubscriber(Subscriber<T> delegate) {
method onSubscribe (line 327) | @Override
method onNext (line 332) | @Override
method onError (line 337) | @Override
method onComplete (line 342) | @Override
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/FlowableWithSchedulerTest.java
class FlowableWithSchedulerTest (line 29) | public final class FlowableWithSchedulerTest {
type Service (line 33) | interface Service {
method body (line 34) | @GET("/")
method response (line 37) | @GET("/")
method result (line 40) | @GET("/")
method setUp (line 47) | @Before
method bodyUsesScheduler (line 58) | @Test
method responseUsesScheduler (line 70) | @Test
method resultUsesScheduler (line 82) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/MaybeTest.java
class MaybeTest (line 32) | public final class MaybeTest {
type Service (line 36) | interface Service {
method body (line 37) | @GET("/")
method response (line 40) | @GET("/")
method result (line 43) | @GET("/")
method setUp (line 49) | @Before
method bodySuccess200 (line 60) | @Test
method bodySuccess404 (line 69) | @Test
method bodyFailure (line 79) | @Test
method responseSuccess200 (line 88) | @Test
method responseSuccess404 (line 98) | @Test
method responseFailure (line 107) | @Test
method resultSuccess200 (line 116) | @Test
method resultSuccess404 (line 127) | @Test
method resultFailure (line 138) | @Test
method subscribeTwice (line 149) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/MaybeThrowingTest.java
class MaybeThrowingTest (line 40) | public final class MaybeThrowingTest {
type Service (line 45) | interface Service {
method body (line 46) | @GET("/")
method response (line 49) | @GET("/")
method result (line 52) | @GET("/")
method setUp (line 58) | @Before
method bodyThrowingInOnSuccessDeliveredToPlugin (line 69) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 98) | @Test
method responseThrowingInOnSuccessDeliveredToPlugin (line 131) | @Test
method responseThrowingInOnErrorDeliveredToPlugin (line 160) | @Test
method resultThrowingInOnSuccessDeliveredToPlugin (line 193) | @Test
method resultThrowingInOnErrorDeliveredToPlugin (line 222) | @Ignore("Single's contract is onNext|onError so we have no way of trig...
class ForwardingObserver (line 259) | private abstract static class ForwardingObserver<T> implements MaybeOb...
method ForwardingObserver (line 262) | ForwardingObserver(MaybeObserver<T> delegate) {
method onSubscribe (line 266) | @Override
method onSuccess (line 271) | @Override
method onError (line 276) | @Override
method onComplete (line 281) | @Override
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/MaybeWithSchedulerTest.java
class MaybeWithSchedulerTest (line 29) | public final class MaybeWithSchedulerTest {
type Service (line 33) | interface Service {
method body (line 34) | @GET("/")
method response (line 37) | @GET("/")
method result (line 40) | @GET("/")
method setUp (line 47) | @Before
method bodyUsesScheduler (line 58) | @Test
method responseUsesScheduler (line 70) | @Test
method resultUsesScheduler (line 82) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/ObservableTest.java
class ObservableTest (line 33) | public final class ObservableTest {
type Service (line 37) | interface Service {
method body (line 38) | @GET("/")
method response (line 41) | @GET("/")
method result (line 44) | @GET("/")
method setUp (line 50) | @Before
method bodySuccess200 (line 61) | @Test
method bodySuccess404 (line 70) | @Test
method bodyFailure (line 80) | @Test
method responseSuccess200 (line 89) | @Test
method responseSuccess404 (line 99) | @Test
method responseFailure (line 109) | @Test
method resultSuccess200 (line 118) | @Test
method resultSuccess404 (line 130) | @Test
method resultFailure (line 142) | @Test
method observableAssembly (line 154) | @Test
method subscribeTwice (line 165) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/ObservableThrowingTest.java
class ObservableThrowingTest (line 39) | public final class ObservableThrowingTest {
type Service (line 44) | interface Service {
method body (line 45) | @GET("/")
method response (line 48) | @GET("/")
method result (line 51) | @GET("/")
method setUp (line 57) | @Before
method bodyThrowingInOnNextDeliveredToError (line 68) | @Test
method bodyThrowingInOnCompleteDeliveredToPlugin (line 87) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 118) | @Test
method responseThrowingInOnNextDeliveredToError (line 151) | @Test
method responseThrowingInOnCompleteDeliveredToPlugin (line 170) | @Test
method responseThrowingInOnErrorDeliveredToPlugin (line 201) | @Test
method resultThrowingInOnNextDeliveredToError (line 234) | @Test
method resultThrowingInOnCompletedDeliveredToPlugin (line 253) | @Test
method resultThrowingInOnErrorDeliveredToPlugin (line 284) | @Test
class ForwardingObserver (line 320) | private abstract static class ForwardingObserver<T> implements Observe...
method ForwardingObserver (line 323) | ForwardingObserver(Observer<T> delegate) {
method onSubscribe (line 327) | @Override
method onNext (line 332) | @Override
method onError (line 337) | @Override
method onComplete (line 342) | @Override
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/ObservableWithSchedulerTest.java
class ObservableWithSchedulerTest (line 29) | public final class ObservableWithSchedulerTest {
type Service (line 33) | interface Service {
method body (line 34) | @GET("/")
method response (line 37) | @GET("/")
method result (line 40) | @GET("/")
method setUp (line 47) | @Before
method bodyUsesScheduler (line 58) | @Test
method responseUsesScheduler (line 70) | @Test
method resultUsesScheduler (line 82) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/RecordingCompletableObserver.java
class RecordingCompletableObserver (line 33) | final class RecordingCompletableObserver implements CompletableObserver {
method RecordingCompletableObserver (line 36) | private RecordingCompletableObserver() {}
method onSubscribe (line 38) | @Override
method onComplete (line 41) | @Override
method onError (line 46) | @Override
method takeNotification (line 51) | private Notification<?> takeNotification() {
method takeError (line 59) | public Throwable takeError() {
method assertComplete (line 67) | public void assertComplete() {
method assertError (line 75) | public void assertError(Throwable throwable) {
method assertError (line 79) | public void assertError(Class<? extends Throwable> errorClass) {
method assertError (line 83) | public void assertError(Class<? extends Throwable> errorClass, String ...
method assertNoEvents (line 92) | public void assertNoEvents() {
class Rule (line 96) | public static final class Rule implements TestRule {
method create (line 99) | public <T> RecordingCompletableObserver create() {
method apply (line 105) | @Override
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/RecordingMaybeObserver.java
class RecordingMaybeObserver (line 34) | final class RecordingMaybeObserver<T> implements MaybeObserver<T> {
method RecordingMaybeObserver (line 37) | private RecordingMaybeObserver() {}
method onSubscribe (line 39) | @Override
method onSuccess (line 42) | @Override
method onError (line 47) | @Override
method onComplete (line 52) | @Override
method takeNotification (line 57) | private Notification<T> takeNotification() {
method takeValue (line 65) | public T takeValue() {
method takeError (line 73) | public Throwable takeError() {
method assertAnyValue (line 81) | public RecordingMaybeObserver<T> assertAnyValue() {
method assertValue (line 86) | public RecordingMaybeObserver<T> assertValue(T value) {
method assertError (line 91) | public void assertError(Throwable throwable) {
method assertError (line 95) | public void assertError(Class<? extends Throwable> errorClass) {
method assertError (line 99) | public void assertError(Class<? extends Throwable> errorClass, String ...
method assertNoEvents (line 108) | public void assertNoEvents() {
class Rule (line 112) | public static final class Rule implements TestRule {
method create (line 115) | public <T> RecordingMaybeObserver<T> create() {
method apply (line 121) | @Override
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/RecordingObserver.java
class RecordingObserver (line 33) | final class RecordingObserver<T> implements Observer<T> {
method RecordingObserver (line 36) | private RecordingObserver() {}
method onSubscribe (line 38) | @Override
method onNext (line 41) | @Override
method onComplete (line 46) | @Override
method onError (line 51) | @Override
method takeNotification (line 56) | private Notification<T> takeNotification() {
method takeValue (line 64) | public T takeValue() {
method takeError (line 72) | public Throwable takeError() {
method assertAnyValue (line 80) | public RecordingObserver<T> assertAnyValue() {
method assertValue (line 85) | public RecordingObserver<T> assertValue(T value) {
method assertComplete (line 90) | public void assertComplete() {
method assertError (line 98) | public void assertError(Throwable throwable) {
method assertError (line 102) | public void assertError(Class<? extends Throwable> errorClass) {
method assertError (line 106) | public void assertError(Class<? extends Throwable> errorClass, String ...
method assertNoEvents (line 115) | public void assertNoEvents() {
class Rule (line 119) | public static final class Rule implements TestRule {
method create (line 122) | public <T> RecordingObserver<T> create() {
method apply (line 128) | @Override
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/RecordingSingleObserver.java
class RecordingSingleObserver (line 34) | final class RecordingSingleObserver<T> implements SingleObserver<T> {
method RecordingSingleObserver (line 37) | private RecordingSingleObserver() {}
method onSubscribe (line 39) | @Override
method onSuccess (line 42) | @Override
method onError (line 47) | @Override
method takeNotification (line 52) | private Notification<T> takeNotification() {
method takeValue (line 60) | public T takeValue() {
method takeError (line 68) | public Throwable takeError() {
method assertAnyValue (line 76) | public RecordingSingleObserver<T> assertAnyValue() {
method assertValue (line 81) | public RecordingSingleObserver<T> assertValue(T value) {
method assertError (line 86) | public void assertError(Throwable throwable) {
method assertError (line 90) | public void assertError(Class<? extends Throwable> errorClass) {
method assertError (line 94) | public void assertError(Class<? extends Throwable> errorClass, String ...
method assertNoEvents (line 103) | public void assertNoEvents() {
class Rule (line 107) | public static final class Rule implements TestRule {
method create (line 110) | public <T> RecordingSingleObserver<T> create() {
method apply (line 116) | @Override
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/RecordingSubscriber.java
class RecordingSubscriber (line 33) | final class RecordingSubscriber<T> implements Subscriber<T> {
method RecordingSubscriber (line 39) | private RecordingSubscriber(long initialRequest) {
method onSubscribe (line 43) | @Override
method onNext (line 50) | @Override
method onComplete (line 55) | @Override
method onError (line 60) | @Override
method takeNotification (line 65) | private Notification<T> takeNotification() {
method takeValue (line 73) | public T takeValue() {
method takeError (line 81) | public Throwable takeError() {
method assertAnyValue (line 89) | public RecordingSubscriber<T> assertAnyValue() {
method assertValue (line 94) | public RecordingSubscriber<T> assertValue(T value) {
method assertComplete (line 99) | public void assertComplete() {
method assertError (line 107) | public void assertError(Throwable throwable) {
method assertError (line 111) | public void assertError(Class<? extends Throwable> errorClass) {
method assertError (line 115) | public void assertError(Class<? extends Throwable> errorClass, String ...
method assertNoEvents (line 124) | public void assertNoEvents() {
method request (line 128) | public void request(long amount) {
class Rule (line 135) | public static final class Rule implements TestRule {
method create (line 138) | public <T> RecordingSubscriber<T> create() {
method createWithInitialRequest (line 142) | public <T> RecordingSubscriber<T> createWithInitialRequest(long init...
method apply (line 148) | @Override
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/ResultTest.java
class ResultTest (line 25) | public final class ResultTest {
method response (line 26) | @Test
method nullResponseThrows (line 35) | @Test
method error (line 45) | @Test
method nullErrorThrows (line 54) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/RxJava2CallAdapterFactoryTest.java
class RxJava2CallAdapterFactoryTest (line 36) | public class RxJava2CallAdapterFactoryTest {
method setUp (line 42) | @Before
method nullSchedulerThrows (line 52) | @Test
method nonRxJavaTypeReturnsNull (line 62) | @Test
method responseTypes (line 68) | @Test
method rawBodyTypeThrows (line 162) | @Test
method rawResponseTypeThrows (line 209) | @Test
method rawResultTypeThrows (line 252) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/RxJavaPluginsResetRule.java
class RxJavaPluginsResetRule (line 23) | final class RxJavaPluginsResetRule implements TestRule {
method apply (line 24) | @Override
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/SingleTest.java
class SingleTest (line 32) | public final class SingleTest {
type Service (line 36) | interface Service {
method body (line 37) | @GET("/")
method response (line 40) | @GET("/")
method result (line 43) | @GET("/")
method setUp (line 49) | @Before
method bodySuccess200 (line 60) | @Test
method bodySuccess404 (line 69) | @Test
method bodyFailure (line 79) | @Test
method responseSuccess200 (line 88) | @Test
method responseSuccess404 (line 98) | @Test
method responseFailure (line 107) | @Test
method resultSuccess200 (line 116) | @Test
method resultSuccess404 (line 127) | @Test
method resultFailure (line 138) | @Test
method subscribeTwice (line 149) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/SingleThrowingTest.java
class SingleThrowingTest (line 40) | public final class SingleThrowingTest {
type Service (line 47) | interface Service {
method body (line 48) | @GET("/")
method response (line 51) | @GET("/")
method result (line 54) | @GET("/")
method setUp (line 60) | @Before
method bodyThrowingInOnSuccessDeliveredToPlugin (line 71) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 100) | @Test
method responseThrowingInOnSuccessDeliveredToPlugin (line 133) | @Test
method responseThrowingInOnErrorDeliveredToPlugin (line 162) | @Test
method resultThrowingInOnSuccessDeliveredToPlugin (line 195) | @Test
method resultThrowingInOnErrorDeliveredToPlugin (line 224) | @Ignore("Single's contract is onNext|onError so we have no way of trig...
class ForwardingObserver (line 261) | private abstract static class ForwardingObserver<T> implements SingleO...
method ForwardingObserver (line 264) | ForwardingObserver(SingleObserver<T> delegate) {
method onSubscribe (line 268) | @Override
method onSuccess (line 273) | @Override
method onError (line 278) | @Override
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/SingleWithSchedulerTest.java
class SingleWithSchedulerTest (line 29) | public final class SingleWithSchedulerTest {
type Service (line 33) | interface Service {
method body (line 34) | @GET("/")
method response (line 37) | @GET("/")
method result (line 40) | @GET("/")
method setUp (line 47) | @Before
method bodyUsesScheduler (line 58) | @Test
method responseUsesScheduler (line 70) | @Test
method resultUsesScheduler (line 82) | @Test
FILE: retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/StringConverterFactory.java
class StringConverterFactory (line 26) | final class StringConverterFactory extends Converter.Factory {
method responseBodyConverter (line 27) | @Override
method requestBodyConverter (line 33) | @Override
FILE: retrofit-adapters/rxjava3/src/main/java/retrofit2/adapter/rxjava3/BodyObservable.java
class BodyObservable (line 26) | final class BodyObservable<T> extends Observable<T> {
method BodyObservable (line 29) | BodyObservable(Observable<Response<T>> upstream) {
method subscribeActual (line 33) | @Override
class BodyObserver (line 38) | private static class BodyObserver<R> implements Observer<Response<R>> {
method BodyObserver (line 42) | BodyObserver(Observer<? super R> observer) {
method onSubscribe (line 46) | @Override
method onNext (line 51) | @Override
method onComplete (line 67) | @Override
method onError (line 74) | @Override
FILE: retrofit-adapters/rxjava3/src/main/java/retrofit2/adapter/rxjava3/CallEnqueueObservable.java
class CallEnqueueObservable (line 28) | final class CallEnqueueObservable<T> extends Observable<Response<T>> {
method CallEnqueueObservable (line 31) | CallEnqueueObservable(Call<T> originalCall) {
method subscribeActual (line 35) | @Override
class CallCallback (line 46) | private static final class CallCallback<T> implements Disposable, Call...
method CallCallback (line 52) | CallCallback(Call<?> call, Observer<? super Response<T>> observer) {
method onResponse (line 57) | @Override
method onFailure (line 83) | @Override
method dispose (line 95) | @Override
method isDisposed (line 101) | @Override
FILE: retrofit-adapters/rxjava3/src/main/java/retrofit2/adapter/rxjava3/CallExecuteObservable.java
class CallExecuteObservable (line 27) | final class CallExecuteObservable<T> extends Observable<Response<T>> {
method CallExecuteObservable (line 30) | CallExecuteObservable(Call<T> originalCall) {
method subscribeActual (line 34) | @Override
class CallDisposable (line 69) | private static final class CallDisposable implements Disposable {
method CallDisposable (line 73) | CallDisposable(Call<?> call) {
method dispose (line 77) | @Override
method isDisposed (line 83) | @Override
FILE: retrofit-adapters/rxjava3/src/main/java/retrofit2/adapter/rxjava3/HttpException.java
class HttpException (line 21) | @Deprecated
method HttpException (line 23) | public HttpException(Response<?> response) {
FILE: retrofit-adapters/rxjava3/src/main/java/retrofit2/adapter/rxjava3/Result.java
class Result (line 23) | public final class Result<T> {
method error (line 24) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method response (line 30) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method Result (line 39) | private Result(@Nullable Response<T> response, @Nullable Throwable err...
method response (line 48) | public @Nullable Response<T> response() {
method error (line 60) | public @Nullable Throwable error() {
method isError (line 65) | public boolean isError() {
FILE: retrofit-adapters/rxjava3/src/main/java/retrofit2/adapter/rxjava3/ResultObservable.java
class ResultObservable (line 26) | final class ResultObservable<T> extends Observable<Result<T>> {
method ResultObservable (line 29) | ResultObservable(Observable<Response<T>> upstream) {
method subscribeActual (line 33) | @Override
class ResultObserver (line 38) | private static class ResultObserver<R> implements Observer<Response<R>> {
method ResultObserver (line 41) | ResultObserver(Observer<? super Result<R>> observer) {
method onSubscribe (line 45) | @Override
method onNext (line 50) | @Override
method onError (line 55) | @Override
method onComplete (line 71) | @Override
FILE: retrofit-adapters/rxjava3/src/main/java/retrofit2/adapter/rxjava3/RxJava3CallAdapter.java
class RxJava3CallAdapter (line 28) | final class RxJava3CallAdapter<R> implements CallAdapter<R, Object> {
method RxJava3CallAdapter (line 39) | RxJava3CallAdapter(
method responseType (line 60) | @Override
method adapt (line 65) | @Override
FILE: retrofit-adapters/rxjava3/src/main/java/retrofit2/adapter/rxjava3/RxJava3CallAdapterFactory.java
class RxJava3CallAdapterFactory (line 61) | public final class RxJava3CallAdapterFactory extends CallAdapter.Factory {
method create (line 67) | public static RxJava3CallAdapterFactory create() {
method createSynchronous (line 76) | public static RxJava3CallAdapterFactory createSynchronous() {
method createWithScheduler (line 84) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method RxJava3CallAdapterFactory (line 93) | private RxJava3CallAdapterFactory(@Nullable Scheduler scheduler, boole...
method get (line 98) | @Override
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/AsyncTest.java
class AsyncTest (line 50) | public final class AsyncTest {
type Service (line 53) | interface Service {
method completable (line 54) | @GET("/")
method setUp (line 61) | @Before
method tearDown (line 82) | @After
method success (line 87) | @Test
method failure (line 98) | @Test
method throwingInOnCompleteDeliveredToPlugin (line 109) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 139) | @Test
method bodyThrowingFatalInOnErrorPropagates (line 173) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/CancelDisposeTest.java
class CancelDisposeTest (line 34) | public final class CancelDisposeTest {
type Service (line 37) | interface Service {
method go (line 38) | @GET("/")
method setUp (line 45) | @Before
method disposeCancelsCall (line 57) | @Test
method disposeBeforeEnqueueDoesNotEnqueue (line 66) | @SuppressWarnings("ResultOfMethodCallIgnored")
method cancelDoesNotDispose (line 74) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/CancelDisposeTestSync.java
class CancelDisposeTestSync (line 29) | public final class CancelDisposeTestSync {
type Service (line 32) | interface Service {
method go (line 33) | @GET("/")
method setUp (line 40) | @Before
method disposeBeforeExecuteDoesNotEnqueue (line 52) | @SuppressWarnings("ResultOfMethodCallIgnored")
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/CompletableTest.java
class CompletableTest (line 30) | public final class CompletableTest {
type Service (line 37) | interface Service {
method completable (line 38) | @GET("/")
method setUp (line 44) | @Before
method completableSuccess200 (line 54) | @Test
method completableSuccess404 (line 63) | @Test
method completableFailure (line 73) | @Test
method subscribeTwice (line 82) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/CompletableThrowingTest.java
class CompletableThrowingTest (line 36) | public final class CompletableThrowingTest {
type Service (line 44) | interface Service {
method completable (line 45) | @GET("/")
method setUp (line 51) | @Before
method throwingInOnCompleteDeliveredToPlugin (line 61) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 88) | @Test
class ForwardingCompletableObserver (line 119) | abstract static class ForwardingCompletableObserver implements Complet...
method ForwardingCompletableObserver (line 122) | ForwardingCompletableObserver(CompletableObserver delegate) {
method onSubscribe (line 126) | @Override
method onComplete (line 131) | @Override
method onError (line 136) | @Override
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/CompletableWithSchedulerTest.java
class CompletableWithSchedulerTest (line 28) | public final class CompletableWithSchedulerTest {
type Service (line 35) | interface Service {
method completable (line 36) | @GET("/")
method setUp (line 43) | @Before
method completableUsesScheduler (line 53) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/FlowableTest.java
class FlowableTest (line 32) | public final class FlowableTest {
type Service (line 36) | interface Service {
method body (line 37) | @GET("/")
method response (line 40) | @GET("/")
method result (line 43) | @GET("/")
method setUp (line 49) | @Before
method bodySuccess200 (line 60) | @Test
method bodySuccess404 (line 69) | @Test
method bodyFailure (line 79) | @Test
method responseSuccess200 (line 88) | @Test
method responseSuccess404 (line 98) | @Test
method responseFailure (line 108) | @Test
method resultSuccess200 (line 117) | @Test
method resultSuccess404 (line 129) | @Test
method resultFailure (line 141) | @Test
method subscribeTwice (line 153) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/FlowableThrowingTest.java
class FlowableThrowingTest (line 38) | public final class FlowableThrowingTest {
type Service (line 43) | interface Service {
method body (line 44) | @GET("/")
method response (line 47) | @GET("/")
method result (line 50) | @GET("/")
method setUp (line 56) | @Before
method bodyThrowingInOnNextDeliveredToError (line 67) | @Test
method bodyThrowingInOnCompleteDeliveredToPlugin (line 86) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 114) | @Test
method responseThrowingInOnNextDeliveredToError (line 147) | @Test
method responseThrowingInOnCompleteDeliveredToPlugin (line 166) | @Test
method responseThrowingInOnErrorDeliveredToPlugin (line 194) | @Test
method resultThrowingInOnNextDeliveredToError (line 227) | @Test
method resultThrowingInOnCompletedDeliveredToPlugin (line 246) | @Test
method resultThrowingInOnErrorDeliveredToPlugin (line 274) | @Test
class ForwardingSubscriber (line 310) | private abstract static class ForwardingSubscriber<T> implements Subsc...
method ForwardingSubscriber (line 313) | ForwardingSubscriber(Subscriber<T> delegate) {
method onSubscribe (line 317) | @Override
method onNext (line 322) | @Override
method onError (line 327) | @Override
method onComplete (line 332) | @Override
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/FlowableWithSchedulerTest.java
class FlowableWithSchedulerTest (line 29) | public final class FlowableWithSchedulerTest {
type Service (line 33) | interface Service {
method body (line 34) | @GET("/")
method response (line 37) | @GET("/")
method result (line 40) | @GET("/")
method setUp (line 47) | @Before
method bodyUsesScheduler (line 58) | @Test
method responseUsesScheduler (line 70) | @Test
method resultUsesScheduler (line 82) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/MaybeTest.java
class MaybeTest (line 32) | public final class MaybeTest {
type Service (line 36) | interface Service {
method body (line 37) | @GET("/")
method response (line 40) | @GET("/")
method result (line 43) | @GET("/")
method setUp (line 49) | @Before
method bodySuccess200 (line 60) | @Test
method bodySuccess404 (line 69) | @Test
method bodyFailure (line 79) | @Test
method responseSuccess200 (line 88) | @Test
method responseSuccess404 (line 98) | @Test
method responseFailure (line 107) | @Test
method resultSuccess200 (line 116) | @Test
method resultSuccess404 (line 127) | @Test
method resultFailure (line 138) | @Test
method subscribeTwice (line 149) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/MaybeThrowingTest.java
class MaybeThrowingTest (line 39) | public final class MaybeThrowingTest {
type Service (line 44) | interface Service {
method body (line 45) | @GET("/")
method response (line 48) | @GET("/")
method result (line 51) | @GET("/")
method setUp (line 57) | @Before
method bodyThrowingInOnSuccessDeliveredToPlugin (line 68) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 95) | @Test
method responseThrowingInOnSuccessDeliveredToPlugin (line 128) | @Test
method responseThrowingInOnErrorDeliveredToPlugin (line 155) | @Test
method resultThrowingInOnSuccessDeliveredToPlugin (line 188) | @Test
method resultThrowingInOnErrorDeliveredToPlugin (line 215) | @Ignore("Single's contract is onNext|onError so we have no way of trig...
class ForwardingObserver (line 252) | private abstract static class ForwardingObserver<T> implements MaybeOb...
method ForwardingObserver (line 255) | ForwardingObserver(MaybeObserver<T> delegate) {
method onSubscribe (line 259) | @Override
method onSuccess (line 264) | @Override
method onError (line 269) | @Override
method onComplete (line 274) | @Override
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/MaybeWithSchedulerTest.java
class MaybeWithSchedulerTest (line 29) | public final class MaybeWithSchedulerTest {
type Service (line 33) | interface Service {
method body (line 34) | @GET("/")
method response (line 37) | @GET("/")
method result (line 40) | @GET("/")
method setUp (line 47) | @Before
method bodyUsesScheduler (line 58) | @Test
method responseUsesScheduler (line 70) | @Test
method resultUsesScheduler (line 82) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/ObservableTest.java
class ObservableTest (line 33) | public final class ObservableTest {
type Service (line 37) | interface Service {
method body (line 38) | @GET("/")
method response (line 41) | @GET("/")
method result (line 44) | @GET("/")
method setUp (line 50) | @Before
method bodySuccess200 (line 61) | @Test
method bodySuccess404 (line 70) | @Test
method bodyFailure (line 80) | @Test
method responseSuccess200 (line 89) | @Test
method responseSuccess404 (line 99) | @Test
method responseFailure (line 109) | @Test
method resultSuccess200 (line 118) | @Test
method resultSuccess404 (line 130) | @Test
method resultFailure (line 142) | @Test
method observableAssembly (line 154) | @Test
method subscribeTwice (line 165) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/ObservableThrowingTest.java
class ObservableThrowingTest (line 38) | public final class ObservableThrowingTest {
type Service (line 43) | interface Service {
method body (line 44) | @GET("/")
method response (line 47) | @GET("/")
method result (line 50) | @GET("/")
method setUp (line 56) | @Before
method bodyThrowingInOnNextDeliveredToError (line 67) | @Test
method bodyThrowingInOnCompleteDeliveredToPlugin (line 86) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 114) | @Test
method responseThrowingInOnNextDeliveredToError (line 147) | @Test
method responseThrowingInOnCompleteDeliveredToPlugin (line 166) | @Test
method responseThrowingInOnErrorDeliveredToPlugin (line 194) | @Test
method resultThrowingInOnNextDeliveredToError (line 227) | @Test
method resultThrowingInOnCompletedDeliveredToPlugin (line 246) | @Test
method resultThrowingInOnErrorDeliveredToPlugin (line 274) | @Test
class ForwardingObserver (line 310) | private abstract static class ForwardingObserver<T> implements Observe...
method ForwardingObserver (line 313) | ForwardingObserver(Observer<T> delegate) {
method onSubscribe (line 317) | @Override
method onNext (line 322) | @Override
method onError (line 327) | @Override
method onComplete (line 332) | @Override
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/ObservableWithSchedulerTest.java
class ObservableWithSchedulerTest (line 29) | public final class ObservableWithSchedulerTest {
type Service (line 33) | interface Service {
method body (line 34) | @GET("/")
method response (line 37) | @GET("/")
method result (line 40) | @GET("/")
method setUp (line 47) | @Before
method bodyUsesScheduler (line 58) | @Test
method responseUsesScheduler (line 70) | @Test
method resultUsesScheduler (line 82) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/RecordingCompletableObserver.java
class RecordingCompletableObserver (line 33) | final class RecordingCompletableObserver implements CompletableObserver {
method RecordingCompletableObserver (line 36) | private RecordingCompletableObserver() {}
method onSubscribe (line 38) | @Override
method onComplete (line 41) | @Override
method onError (line 46) | @Override
method takeNotification (line 51) | private Notification<?> takeNotification() {
method takeError (line 59) | public Throwable takeError() {
method assertComplete (line 67) | public void assertComplete() {
method assertError (line 75) | public void assertError(Throwable throwable) {
method assertError (line 79) | public void assertError(Class<? extends Throwable> errorClass) {
method assertError (line 83) | public void assertError(Class<? extends Throwable> errorClass, String ...
method assertNoEvents (line 92) | public void assertNoEvents() {
class Rule (line 96) | public static final class Rule implements TestRule {
method create (line 99) | public <T> RecordingCompletableObserver create() {
method apply (line 105) | @Override
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/RecordingMaybeObserver.java
class RecordingMaybeObserver (line 34) | final class RecordingMaybeObserver<T> implements MaybeObserver<T> {
method RecordingMaybeObserver (line 37) | private RecordingMaybeObserver() {}
method onSubscribe (line 39) | @Override
method onSuccess (line 42) | @Override
method onError (line 47) | @Override
method onComplete (line 52) | @Override
method takeNotification (line 57) | private Notification<T> takeNotification() {
method takeValue (line 65) | public T takeValue() {
method takeError (line 73) | public Throwable takeError() {
method assertAnyValue (line 81) | public RecordingMaybeObserver<T> assertAnyValue() {
method assertValue (line 86) | public RecordingMaybeObserver<T> assertValue(T value) {
method assertError (line 91) | public void assertError(Throwable throwable) {
method assertError (line 95) | public void assertError(Class<? extends Throwable> errorClass) {
method assertError (line 99) | public void assertError(Class<? extends Throwable> errorClass, String ...
method assertNoEvents (line 108) | public void assertNoEvents() {
class Rule (line 112) | public static final class Rule implements TestRule {
method create (line 115) | public <T> RecordingMaybeObserver<T> create() {
method apply (line 121) | @Override
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/RecordingObserver.java
class RecordingObserver (line 33) | final class RecordingObserver<T> implements Observer<T> {
method RecordingObserver (line 36) | private RecordingObserver() {}
method onSubscribe (line 38) | @Override
method onNext (line 41) | @Override
method onComplete (line 46) | @Override
method onError (line 51) | @Override
method takeNotification (line 56) | private Notification<T> takeNotification() {
method takeValue (line 64) | public T takeValue() {
method takeError (line 72) | public Throwable takeError() {
method assertAnyValue (line 80) | public RecordingObserver<T> assertAnyValue() {
method assertValue (line 85) | public RecordingObserver<T> assertValue(T value) {
method assertComplete (line 90) | public void assertComplete() {
method assertError (line 98) | public void assertError(Throwable throwable) {
method assertError (line 102) | public void assertError(Class<? extends Throwable> errorClass) {
method assertError (line 106) | public void assertError(Class<? extends Throwable> errorClass, String ...
method assertNoEvents (line 115) | public void assertNoEvents() {
class Rule (line 119) | public static final class Rule implements TestRule {
method create (line 122) | public <T> RecordingObserver<T> create() {
method apply (line 128) | @Override
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/RecordingSingleObserver.java
class RecordingSingleObserver (line 34) | final class RecordingSingleObserver<T> implements SingleObserver<T> {
method RecordingSingleObserver (line 37) | private RecordingSingleObserver() {}
method onSubscribe (line 39) | @Override
method onSuccess (line 42) | @Override
method onError (line 47) | @Override
method takeNotification (line 52) | private Notification<T> takeNotification() {
method takeValue (line 60) | public T takeValue() {
method takeError (line 68) | public Throwable takeError() {
method assertAnyValue (line 76) | public RecordingSingleObserver<T> assertAnyValue() {
method assertValue (line 81) | public RecordingSingleObserver<T> assertValue(T value) {
method assertError (line 86) | public void assertError(Throwable throwable) {
method assertError (line 90) | public void assertError(Class<? extends Throwable> errorClass) {
method assertError (line 94) | public void assertError(Class<? extends Throwable> errorClass, String ...
method assertNoEvents (line 103) | public void assertNoEvents() {
class Rule (line 107) | public static final class Rule implements TestRule {
method create (line 110) | public <T> RecordingSingleObserver<T> create() {
method apply (line 116) | @Override
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/RecordingSubscriber.java
class RecordingSubscriber (line 34) | final class RecordingSubscriber<T> implements FlowableSubscriber<T> {
method RecordingSubscriber (line 40) | private RecordingSubscriber(long initialRequest) {
method onSubscribe (line 44) | @Override
method onNext (line 51) | @Override
method onComplete (line 56) | @Override
method onError (line 61) | @Override
method takeNotification (line 66) | private Notification<T> takeNotification() {
method takeValue (line 74) | public T takeValue() {
method takeError (line 82) | public Throwable takeError() {
method assertAnyValue (line 90) | public RecordingSubscriber<T> assertAnyValue() {
method assertValue (line 95) | public RecordingSubscriber<T> assertValue(T value) {
method assertComplete (line 100) | public void assertComplete() {
method assertError (line 108) | public void assertError(Throwable throwable) {
method assertError (line 112) | public void assertError(Class<? extends Throwable> errorClass) {
method assertError (line 116) | public void assertError(Class<? extends Throwable> errorClass, String ...
method assertNoEvents (line 125) | public void assertNoEvents() {
method request (line 129) | public void request(long amount) {
class Rule (line 136) | public static final class Rule implements TestRule {
method create (line 139) | public <T> RecordingSubscriber<T> create() {
method createWithInitialRequest (line 143) | public <T> RecordingSubscriber<T> createWithInitialRequest(long init...
method apply (line 149) | @Override
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/ResultTest.java
class ResultTest (line 25) | public final class ResultTest {
method response (line 26) | @Test
method nullResponseThrows (line 35) | @Test
method error (line 45) | @Test
method nullErrorThrows (line 54) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/RxJava3CallAdapterFactoryTest.java
class RxJava3CallAdapterFactoryTest (line 36) | public class RxJava3CallAdapterFactoryTest {
method setUp (line 42) | @Before
method nullSchedulerThrows (line 52) | @Test
method nonRxJavaTypeReturnsNull (line 62) | @Test
method responseTypes (line 68) | @Test
method rawBodyTypeThrows (line 162) | @Test
method rawResponseTypeThrows (line 209) | @Test
method rawResultTypeThrows (line 252) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/RxJavaPluginsResetRule.java
class RxJavaPluginsResetRule (line 23) | final class RxJavaPluginsResetRule implements TestRule {
method apply (line 24) | @Override
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/SingleTest.java
class SingleTest (line 32) | public final class SingleTest {
type Service (line 36) | interface Service {
method body (line 37) | @GET("/")
method response (line 40) | @GET("/")
method result (line 43) | @GET("/")
method setUp (line 49) | @Before
method bodySuccess200 (line 60) | @Test
method bodySuccess404 (line 69) | @Test
method bodyFailure (line 79) | @Test
method responseSuccess200 (line 88) | @Test
method responseSuccess404 (line 98) | @Test
method responseFailure (line 107) | @Test
method resultSuccess200 (line 116) | @Test
method resultSuccess404 (line 127) | @Test
method resultFailure (line 138) | @Test
method subscribeTwice (line 149) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/SingleThrowingTest.java
class SingleThrowingTest (line 39) | public final class SingleThrowingTest {
type Service (line 46) | interface Service {
method body (line 47) | @GET("/")
method response (line 50) | @GET("/")
method result (line 53) | @GET("/")
method setUp (line 59) | @Before
method bodyThrowingInOnSuccessDeliveredToPlugin (line 70) | @Test
method bodyThrowingInOnErrorDeliveredToPlugin (line 97) | @Test
method responseThrowingInOnSuccessDeliveredToPlugin (line 130) | @Test
method responseThrowingInOnErrorDeliveredToPlugin (line 157) | @Test
method resultThrowingInOnSuccessDeliveredToPlugin (line 190) | @Test
method resultThrowingInOnErrorDeliveredToPlugin (line 217) | @Ignore("Single's contract is onNext|onError so we have no way of trig...
class ForwardingObserver (line 254) | private abstract static class ForwardingObserver<T> implements SingleO...
method ForwardingObserver (line 257) | ForwardingObserver(SingleObserver<T> delegate) {
method onSubscribe (line 261) | @Override
method onSuccess (line 266) | @Override
method onError (line 271) | @Override
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/SingleWithSchedulerTest.java
class SingleWithSchedulerTest (line 29) | public final class SingleWithSchedulerTest {
type Service (line 33) | interface Service {
method body (line 34) | @GET("/")
method response (line 37) | @GET("/")
method result (line 40) | @GET("/")
method setUp (line 47) | @Before
method bodyUsesScheduler (line 58) | @Test
method responseUsesScheduler (line 70) | @Test
method resultUsesScheduler (line 82) | @Test
FILE: retrofit-adapters/rxjava3/src/test/java/retrofit2/adapter/rxjava3/StringConverterFactory.java
class StringConverterFactory (line 26) | final class StringConverterFactory extends Converter.Factory {
method responseBodyConverter (line 27) | @Override
method requestBodyConverter (line 33) | @Override
FILE: retrofit-adapters/scala/src/main/java/retrofit2/adapter/scala/BodyCallAdapter.java
class BodyCallAdapter (line 27) | final class BodyCallAdapter<T> implements CallAdapter<T, Future<T>> {
method BodyCallAdapter (line 30) | BodyCallAdapter(Type responseType) {
method responseType (line 34) | @Override
method adapt (line 39) | @Override
FILE: retrofit-adapters/scala/src/main/java/retrofit2/adapter/scala/ResponseCallAdapter.java
class ResponseCallAdapter (line 26) | final class ResponseCallAdapter<T> implements CallAdapter<T, Future<Resp...
method ResponseCallAdapter (line 29) | ResponseCallAdapter(Type responseType) {
method responseType (line 33) | @Override
method adapt (line 38) | @Override
FILE: retrofit-adapters/scala/src/main/java/retrofit2/adapter/scala/ScalaCallAdapterFactory.java
class ScalaCallAdapterFactory (line 51) | public final class ScalaCallAdapterFactory extends CallAdapter.Factory {
method create (line 52) | public static ScalaCallAdapterFactory create() {
method ScalaCallAdapterFactory (line 56) | private ScalaCallAdapterFactory() {}
method get (line 58) | @Override
FILE: retrofit-adapters/scala/src/test/java/retrofit2/adapter/scala/FutureTest.java
class FutureTest (line 37) | public final class FutureTest {
type Service (line 40) | interface Service {
method body (line 41) | @GET("/")
method response (line 44) | @GET("/")
method setUp (line 50) | @Before
method bodySuccess200 (line 61) | @Test
method bodySuccess404 (line 70) | @Test
method bodyFailure (line 85) | @Test
method responseSuccess200 (line 98) | @Test
method responseSuccess404 (line 108) | @Test
method responseFailure (line 118) | @Test
FILE: retrofit-adapters/scala/src/test/java/retrofit2/adapter/scala/ScalaCallAdapterFactoryTest.java
class ScalaCallAdapterFactoryTest (line 34) | public final class ScalaCallAdapterFactoryTest {
method setUp (line 42) | @Before
method responseType (line 52) | @Test
method nonListenableFutureReturnsNull (line 77) | @Test
method rawTypeThrows (line 83) | @Test
method rawResponseTypeThrows (line 97) | @Test
FILE: retrofit-adapters/scala/src/test/java/retrofit2/adapter/scala/StringConverterFactory.java
class StringConverterFactory (line 26) | final class StringConverterFactory extends Converter.Factory {
method responseBodyConverter (line 27) | @Override
method requestBodyConverter (line 33) | @Override
FILE: retrofit-converters/gson/src/main/java/retrofit2/converter/gson/GsonConverterFactory.java
class GsonConverterFactory (line 37) | public final class GsonConverterFactory extends Converter.Factory {
method create (line 42) | public static GsonConverterFactory create() {
method create (line 50) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method GsonConverterFactory (line 59) | private GsonConverterFactory(Gson gson, boolean streaming) {
method withStreaming (line 70) | public GsonConverterFactory withStreaming() {
method responseBodyConverter (line 74) | @Override
method requestBodyConverter (line 81) | @Override
FILE: retrofit-converters/gson/src/main/java/retrofit2/converter/gson/GsonRequestBodyConverter.java
class GsonRequestBodyConverter (line 32) | final class GsonRequestBodyConverter<T> implements Converter<T, RequestB...
method GsonRequestBodyConverter (line 39) | GsonRequestBodyConverter(Gson gson, TypeAdapter<T> adapter, boolean st...
method convert (line 45) | @Override
method writeJson (line 56) | static <T> void writeJson(BufferedSink sink, Gson gson, TypeAdapter<T>...
FILE: retrofit-converters/gson/src/main/java/retrofit2/converter/gson/GsonResponseBodyConverter.java
class GsonResponseBodyConverter (line 27) | final class GsonResponseBodyConverter<T> implements Converter<ResponseBo...
method GsonResponseBodyConverter (line 31) | GsonResponseBodyConverter(Gson gson, TypeAdapter<T> adapter) {
method convert (line 36) | @Override
FILE: retrofit-converters/gson/src/main/java/retrofit2/converter/gson/GsonStreamingRequestBody.java
class GsonStreamingRequestBody (line 28) | final class GsonStreamingRequestBody<T> extends RequestBody {
method GsonStreamingRequestBody (line 33) | public GsonStreamingRequestBody(Gson gson, TypeAdapter<T> adapter, T v...
method contentType (line 39) | @Override
method writeTo (line 44) | @Override
FILE: retrofit-converters/gson/src/test/java/retrofit2/converter/gson/GsonConverterFactoryTest.java
class GsonConverterFactoryTest (line 49) | @RunWith(TestParameterInjector.class)
type AnInterface (line 51) | interface AnInterface {
method getName (line 52) | String getName();
class AnImplementation (line 55) | static class AnImplementation implements AnInterface {
method AnImplementation (line 58) | AnImplementation(String name) {
method getName (line 62) | @Override
class ErroringValue (line 68) | static final class ErroringValue {
method write (line 71) | @Override
method read (line 76) | @Override
method ErroringValue (line 88) | ErroringValue(String theName) {
class AnInterfaceAdapter (line 93) | static class AnInterfaceAdapter extends TypeAdapter<AnInterface> {
method write (line 94) | @Override
method read (line 101) | @Override
type Service (line 119) | interface Service {
method anImplementation (line 120) | @POST("/")
method anInterface (line 123) | @POST("/")
method readErroringValue (line 126) | @GET("/")
method writeErroringValue (line 129) | @POST("/")
method GsonConverterFactoryTest (line 138) | public GsonConverterFactoryTest(@TestParameter boolean streaming) {
method anInterface (line 161) | @Test
method anImplementation (line 175) | @Test
method serializeUsesConfiguration (line 189) | @Test
method deserializeUsesConfiguration (line 200) | @Test
method requireFullResponseDocumentConsumption (line 209) | @Test
method serializeIsStreamed (line 222) | @Test
FILE: retrofit-converters/guava/src/main/java/retrofit/converter/guava/GuavaOptionalConverterFactory.java
class GuavaOptionalConverterFactory (line 31) | public final class GuavaOptionalConverterFactory extends Converter.Facto...
method create (line 32) | public static GuavaOptionalConverterFactory create() {
method GuavaOptionalConverterFactory (line 36) | private GuavaOptionalConverterFactory() {}
method responseBodyConverter (line 38) | @Override
FILE: retrofit-converters/guava/src/main/java/retrofit/converter/guava/OptionalConverter.java
class OptionalConverter (line 23) | final class OptionalConverter<T> implements Converter<ResponseBody, Opti...
method OptionalConverter (line 26) | OptionalConverter(Converter<ResponseBody, T> delegate) {
method convert (line 30) | @Override
FILE: retrofit-converters/guava/src/test/java/retrofit/converter/guava/AlwaysNullConverterFactory.java
class AlwaysNullConverterFactory (line 24) | final class AlwaysNullConverterFactory extends Converter.Factory {
method responseBodyConverter (line 25) | @Override
FILE: retrofit-converters/guava/src/test/java/retrofit/converter/guava/GuavaOptionalConverterFactoryTest.java
class GuavaOptionalConverterFactoryTest (line 36) | public final class GuavaOptionalConverterFactoryTest {
type Service (line 37) | interface Service {
method optional (line 38) | @GET("/")
method object (line 41) | @GET("/")
method setUp (line 49) | @Before
method optional (line 60) | @Test
method onlyMatchesOptional (line 69) | @Test
method delegates (line 77) | @Test
FILE: retrofit-converters/jackson/src/main/java/retrofit2/converter/jackson/JacksonConverterFactory.java
class JacksonConverterFactory (line 39) | public final class JacksonConverterFactory extends Converter.Factory {
method create (line 44) | public static JacksonConverterFactory create() {
method create (line 49) | public static JacksonConverterFactory create(ObjectMapper mapper) {
method create (line 54) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method JacksonConverterFactory (line 65) | private JacksonConverterFactory(ObjectMapper mapper, MediaType mediaTy...
method withStreaming (line 77) | public JacksonConverterFactory withStreaming() {
method responseBodyConverter (line 81) | @Override
method requestBodyConverter (line 89) | @Override
FILE: retrofit-converters/jackson/src/main/java/retrofit2/converter/jackson/JacksonRequestBodyConverter.java
class JacksonRequestBodyConverter (line 24) | final class JacksonRequestBodyConverter<T> implements Converter<T, Reque...
method JacksonRequestBodyConverter (line 29) | JacksonRequestBodyConverter(ObjectWriter adapter, MediaType mediaType,...
method convert (line 35) | @Override
FILE: retrofit-converters/jackson/src/main/java/retrofit2/converter/jackson/JacksonResponseBodyConverter.java
class JacksonResponseBodyConverter (line 23) | final class JacksonResponseBodyConverter<T> implements Converter<Respons...
method JacksonResponseBodyConverter (line 26) | JacksonResponseBodyConverter(ObjectReader adapter) {
method convert (line 30) | @Override
FILE: retrofit-converters/jackson/src/main/java/retrofit2/converter/jackson/JacksonStreamingRequestBody.java
class JacksonStreamingRequestBody (line 24) | final class JacksonStreamingRequestBody extends RequestBody {
method JacksonStreamingRequestBody (line 29) | public JacksonStreamingRequestBody(ObjectWriter adapter, Object value,...
method contentType (line 35) | @Override
method writeTo (line 40) | @Override
FILE: retrofit-converters/jackson/src/test/java/retrofit2/converter/jackson/JacksonCborConverterFactoryTest.java
class JacksonCborConverterFactoryTest (line 37) | public class JacksonCborConverterFactoryTest {
class IntWrapper (line 38) | static class IntWrapper {
method IntWrapper (line 41) | public IntWrapper(int v) {
method IntWrapper (line 45) | protected IntWrapper() {}
type Service (line 48) | interface Service {
method post (line 49) | @POST("/")
method setUp (line 57) | @Before
method post (line 68) | @Test
FILE: retrofit-converters/jackson/src/test/java/retrofit2/converter/jackson/JacksonConverterFactoryTest.java
class JacksonConverterFactoryTest (line 51) | @RunWith(TestParameterInjector.class)
type AnInterface (line 53) | interface AnInterface {
method getName (line 54) | String getName();
class AnImplementation (line 57) | static class AnImplementation implements AnInterface {
method AnImplementation (line 60) | AnImplementation() {}
method AnImplementation (line 62) | AnImplementation(String name) {
method getName (line 66) | @Override
class AnInterfaceSerializer (line 72) | static class AnInterfaceSerializer extends StdSerializer<AnInterface> {
method AnInterfaceSerializer (line 73) | AnInterfaceSerializer() {
method serialize (line 77) | @Override
class AnInterfaceDeserializer (line 88) | static class AnInterfaceDeserializer extends StdDeserializer<AnInterfa...
method AnInterfaceDeserializer (line 89) | AnInterfaceDeserializer() {
method deserialize (line 93) | @Override
class ErroringValue (line 113) | static final class ErroringValue {
method ErroringValue (line 116) | ErroringValue(String theName) {
class ErroringValueSerializer (line 121) | static final class ErroringValueSerializer extends StdSerializer<Error...
method ErroringValueSerializer (line 122) | ErroringValueSerializer() {
method serialize (line 126) | @Override
type Service (line 136) | interface Service {
method anImplementation (line 137) | @POST("/")
method anInterface (line 140) | @POST("/")
method erroringValue (line 143) | @POST("/")
method JacksonConverterFactoryTest (line 152) | public JacksonConverterFactoryTest(@TestParameter boolean streaming) {
method anInterface (line 180) | @Test
method anImplementation (line 194) | @Test
method serializeIsStreamed (line 209) | @Test
FILE: retrofit-converters/java8/src/main/java/retrofit/converter/java8/Java8OptionalConverterFactory.java
class Java8OptionalConverterFactory (line 33) | @Deprecated
method create (line 35) | public static Java8OptionalConverterFactory create() {
method Java8OptionalConverterFactory (line 39) | private Java8OptionalConverterFactory() {}
method responseBodyConverter (line 41) | @Override
FILE: retrofit-converters/java8/src/main/java/retrofit/converter/java8/OptionalConverter.java
class OptionalConverter (line 23) | final class OptionalConverter<T> implements Converter<ResponseBody, Opti...
method OptionalConverter (line 26) | OptionalConverter(Converter<ResponseBody, T> delegate) {
method convert (line 30) | @Override
FILE: retrofit-converters/java8/src/test/java/retrofit/converter/java8/AlwaysNullConverterFactory.java
class AlwaysNullConverterFactory (line 24) | final class AlwaysNullConverterFactory extends Converter.Factory {
method responseBodyConverter (line 25) | @Override
FILE: retrofit-converters/java8/src/test/java/retrofit/converter/java8/Java8OptionalConverterFactoryTest.java
class Java8OptionalConverterFactoryTest (line 36) | public final class Java8OptionalConverterFactoryTest {
type Service (line 37) | interface Service {
method optional (line 38) | @GET("/")
method object (line 41) | @GET("/")
method setUp (line 49) | @Before
method optional (line 60) | @Test
method onlyMatchesOptional (line 69) | @Test
method delegates (line 77) | @Test
FILE: retrofit-converters/jaxb/src/main/java/retrofit2/converter/jaxb/JaxbConverterFactory.java
class JaxbConverterFactory (line 34) | public final class JaxbConverterFactory extends Converter.Factory {
method create (line 38) | public static JaxbConverterFactory create() {
method create (line 43) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method JaxbConverterFactory (line 52) | private JaxbConverterFactory(@Nullable JAXBContext context) {
method requestBodyConverter (line 56) | @Override
method responseBodyConverter (line 68) | @Override
method contextForType (line 77) | private JAXBContext contextForType(Class<?> type) {
FILE: retrofit-converters/jaxb/src/main/java/retrofit2/converter/jaxb/JaxbRequestConverter.java
class JaxbRequestConverter (line 29) | final class JaxbRequestConverter<T> implements Converter<T, RequestBody> {
method JaxbRequestConverter (line 34) | JaxbRequestConverter(JAXBContext context, Class<T> type) {
method convert (line 39) | @Override
FILE: retrofit-converters/jaxb/src/main/java/retrofit2/converter/jaxb/JaxbResponseConverter.java
class JaxbResponseConverter (line 28) | final class JaxbResponseConverter<T> implements Converter<ResponseBody, ...
method JaxbResponseConverter (line 33) | JaxbResponseConverter(JAXBContext context, Class<T> type) {
method convert (line 42) | @Override
FILE: retrofit-converters/jaxb/src/test/java/retrofit2/converter/jaxb/Contact.java
class Contact (line 24) | @XmlRootElement(name = "contact")
method Contact (line 32) | @SuppressWarnings("unused") // Used by JAXB.
method Contact (line 37) | public Contact(String name, List<PhoneNumber> phoneNumbers) {
method equals (line 42) | @Override
method hashCode (line 49) | @Override
FILE: retrofit-converters/jaxb/src/test/java/retrofit2/converter/jaxb/JaxbConverterFactoryTest.java
class JaxbConverterFactoryTest (line 36) | public final class JaxbConverterFactoryTest {
type Service (line 50) | interface Service {
method postXml (line 51) | @POST("/")
method getXml (line 54) | @GET("/")
method setUp (line 62) | @Before
method xmlRequestBody (line 70) | @Test
method xmlResponseBody (line 82) | @Test
method characterEncoding (line 91) | @Test
method userSuppliedJaxbContext (line 108) | @Test
method malformedXml (line 126) | @Test
method unrecognizedField (line 139) | @Test
method externalEntity (line 159) | @Test
method externalDtd (line 188) | @Test
FILE: retrofit-converters/jaxb/src/test/java/retrofit2/converter/jaxb/PhoneNumber.java
class PhoneNumber (line 23) | final class PhoneNumber {
method PhoneNumber (line 29) | @SuppressWarnings("unused") // Used by JAXB.
method PhoneNumber (line 34) | PhoneNumber(String number, @Nullable Type type) {
method equals (line 39) | @Override
method hashCode (line 46) | @Override
FILE: retrofit-converters/jaxb/src/test/java/retrofit2/converter/jaxb/Type.java
type Type (line 18) | enum Type {
FILE: retrofit-converters/jaxb3/src/main/java/retrofit2/converter/jaxb3/JaxbConverterFactory.java
class JaxbConverterFactory (line 34) | public final class JaxbConverterFactory extends Converter.Factory {
method create (line 38) | public static JaxbConverterFactory create() {
method create (line 43) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method JaxbConverterFactory (line 52) | private JaxbConverterFactory(@Nullable JAXBContext context) {
method requestBodyConverter (line 56) | @Override
method responseBodyConverter (line 68) | @Override
method contextForType (line 77) | private JAXBContext contextForType(Class<?> type) {
FILE: retrofit-converters/jaxb3/src/main/java/retrofit2/converter/jaxb3/JaxbRequestConverter.java
class JaxbRequestConverter (line 29) | final class JaxbRequestConverter<T> implements Converter<T, RequestBody> {
method JaxbRequestConverter (line 34) | JaxbRequestConverter(JAXBContext context, Class<T> type) {
method convert (line 39) | @Override
FILE: retrofit-converters/jaxb3/src/main/java/retrofit2/converter/jaxb3/JaxbResponseConverter.java
class JaxbResponseConverter (line 28) | final class JaxbResponseConverter<T> implements Converter<ResponseBody, ...
method JaxbResponseConverter (line 33) | JaxbResponseConverter(JAXBContext context, Class<T> type) {
method convert (line 42) | @Override
FILE: retrofit-converters/jaxb3/src/test/java/retrofit2/converter/jaxb3/Contact.java
class Contact (line 24) | @XmlRootElement(name = "contact")
method Contact (line 32) | @SuppressWarnings("unused") // Used by JAXB.
method Contact (line 37) | public Contact(String name, List<PhoneNumber> phoneNumbers) {
method equals (line 42) | @Override
method hashCode (line 49) | @Override
FILE: retrofit-converters/jaxb3/src/test/java/retrofit2/converter/jaxb3/JaxbConverterFactoryTest.java
class JaxbConverterFactoryTest (line 36) | public final class JaxbConverterFactoryTest {
type Service (line 50) | interface Service {
method postXml (line 51) | @POST("/")
method getXml (line 54) | @GET("/")
method setUp (line 62) | @Before
method xmlRequestBody (line 70) | @Test
method xmlResponseBody (line 82) | @Test
method characterEncoding (line 91) | @Test
method userSuppliedJaxbContext (line 108) | @Test
method malformedXml (line 126) | @Test
method unrecognizedField (line 139) | @Test
method externalEntity (line 159) | @Test
method externalDtd (line 188) | @Test
FILE: retrofit-converters/jaxb3/src/test/java/retrofit2/converter/jaxb3/PhoneNumber.java
class PhoneNumber (line 23) | final class PhoneNumber {
method PhoneNumber (line 29) | @SuppressWarnings("unused") // Used by JAXB.
method PhoneNumber (line 34) | PhoneNumber(String number, @Nullable Type type) {
method equals (line 39) | @Override
method hashCode (line 46) | @Override
FILE: retrofit-converters/jaxb3/src/test/java/retrofit2/converter/jaxb3/Type.java
type Type (line 18) | enum Type {
FILE: retrofit-converters/moshi/src/main/java/retrofit2/converter/moshi/MoshiConverterFactory.java
class MoshiConverterFactory (line 46) | public final class MoshiConverterFactory extends Converter.Factory {
method create (line 48) | public static MoshiConverterFactory create() {
method create (line 53) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method MoshiConverterFactory (line 65) | private MoshiConverterFactory(
method asLenient (line 79) | public MoshiConverterFactory asLenient() {
method failOnUnknown (line 84) | public MoshiConverterFactory failOnUnknown() {
method withNullSerialization (line 89) | public MoshiConverterFactory withNullSerialization() {
method withStreaming (line 99) | public MoshiConverterFactory withStreaming() {
method responseBodyConverter (line 103) | @Override
method requestBodyConverter (line 119) | @Override
method jsonAnnotations (line 138) | private static Set<? extends Annotation> jsonAnnotations(Annotation[] ...
FILE: retrofit-converters/moshi/src/main/java/retrofit2/converter/moshi/MoshiRequestBodyConverter.java
class MoshiRequestBodyConverter (line 26) | final class MoshiRequestBodyConverter<T> implements Converter<T, Request...
method MoshiRequestBodyConverter (line 32) | MoshiRequestBodyConverter(JsonAdapter<T> adapter, boolean streaming) {
method convert (line 37) | @Override
FILE: retrofit-converters/moshi/src/main/java/retrofit2/converter/moshi/MoshiResponseBodyConverter.java
class MoshiResponseBodyConverter (line 27) | final class MoshiResponseBodyConverter<T> implements Converter<ResponseB...
method MoshiResponseBodyConverter (line 32) | MoshiResponseBodyConverter(JsonAdapter<T> adapter) {
method convert (line 36) | @Override
FILE: retrofit-converters/moshi/src/main/java/retrofit2/converter/moshi/MoshiStreamingRequestBody.java
class MoshiStreamingRequestBody (line 26) | final class MoshiStreamingRequestBody<T> extends RequestBody {
method MoshiStreamingRequestBody (line 30) | public MoshiStreamingRequestBody(JsonAdapter<T> adapter, T value) {
method contentType (line 35) | @Override
method writeTo (line 40) | @Override
FILE: retrofit-converters/moshi/src/test/java/retrofit2/converter/moshi/MoshiConverterFactoryTest.java
class MoshiConverterFactoryTest (line 56) | @RunWith(TestParameterInjector.class)
type AnInterface (line 65) | interface AnInterface {
method getName (line 66) | String getName();
class AnImplementation (line 69) | static class AnImplementation implements AnInterface {
method AnImplementation (line 72) | AnImplementation(String name) {
method getName (line 76) | @Override
class ErroringValue (line 82) | static final class ErroringValue {
method ErroringValue (line 85) | ErroringValue(String theName) {
class Adapters (line 90) | static class Adapters {
method write (line 91) | @ToJson
method read (line 98) | @FromJson
method write (line 115) | @ToJson
method readQualified (line 120) | @FromJson
method readWithoutEndingObject (line 130) | @FromJson
method write (line 138) | @ToJson
type Service (line 144) | interface Service {
method anImplementation (line 145) | @POST("/")
method anInterface (line 148) | @POST("/")
method readErroringValue (line 151) | @GET("/")
method writeErroringValue (line 154) | @POST("/")
method annotations (line 157) | @POST("/")
method MoshiConverterFactoryTest (line 171) | public MoshiConverterFactoryTest(@TestParameter boolean streaming) {
method anInterface (line 213) | @Test
method anImplementation (line 227) | @Test
method annotations (line 241) | @Test
method asLenient (line 254) | @Test
method withNulls (line 276) | @Test
method failOnUnknown (line 285) | @Test
method utf8BomSkipped (line 298) | @Test
method nonUtf8BomIsNotSkipped (line 311) | @Test
method requireFullResponseDocumentConsumption (line 328) | @Test
method serializeIsStreamed (line 341) | @Test
FILE: retrofit-converters/protobuf/src/main/java/retrofit2/converter/protobuf/ProtoConverterFactory.java
class ProtoConverterFactory (line 39) | public final class ProtoConverterFactory extends Converter.Factory {
method create (line 40) | public static ProtoConverterFactory create() {
method createWithRegistry (line 45) | public static ProtoConverterFactory createWithRegistry(@Nullable Exten...
method ProtoConverterFactory (line 52) | private ProtoConverterFactory(@Nullable ExtensionRegistryLite registry...
method withStreaming (line 63) | public ProtoConverterFactory withStreaming() {
method responseBodyConverter (line 67) | @Override
method requestBodyConverter (line 102) | @Override
FILE: retrofit-converters/protobuf/src/main/java/retrofit2/converter/protobuf/ProtoRequestBodyConverter.java
class ProtoRequestBodyConverter (line 23) | final class ProtoRequestBodyConverter<T extends MessageLite> implements ...
method ProtoRequestBodyConverter (line 28) | ProtoRequestBodyConverter(boolean streaming) {
method convert (line 32) | @Override
FILE: retrofit-converters/protobuf/src/main/java/retrofit2/converter/protobuf/ProtoResponseBodyConverter.java
class ProtoResponseBodyConverter (line 27) | final class ProtoResponseBodyConverter<T extends MessageLite>
method ProtoResponseBodyConverter (line 32) | ProtoResponseBodyConverter(Parser<T> parser, @Nullable ExtensionRegist...
method convert (line 37) | @Override
FILE: retrofit-converters/protobuf/src/main/java/retrofit2/converter/protobuf/ProtoStreamingRequestBody.java
class ProtoStreamingRequestBody (line 26) | final class ProtoStreamingRequestBody extends RequestBody {
method ProtoStreamingRequestBody (line 29) | public ProtoStreamingRequestBody(MessageLite value) {
method contentType (line 33) | @Override
method writeTo (line 38) | @Override
FILE: retrofit-converters/protobuf/src/test/java/retrofit2/converter/protobuf/FallbackParserFinderTest.java
class FallbackParserFinderTest (line 29) | public final class FallbackParserFinderTest {
method converterFactoryFallsBackToParserField (line 30) | @Test
class FakePhone (line 39) | @SuppressWarnings("unused") // Used reflectively.
FILE: retrofit-converters/protobuf/src/test/java/retrofit2/converter/protobuf/ProtoConverterFactoryTest.java
class ProtoConverterFactoryTest (line 52) | @RunWith(TestParameterInjector.class)
type Service (line 54) | interface Service {
method get (line 55) | @GET("/")
method post (line 58) | @POST("/")
method wrongClass (line 61) | @GET("/")
method wrongType (line 64) | @GET("/")
type ServiceWithRegistry (line 68) | interface ServiceWithRegistry {
method get (line 69) | @GET("/")
method ProtoConverterFactoryTest (line 79) | public ProtoConverterFactoryTest(@TestParameter boolean streaming) {
method serializeAndDeserialize (line 104) | @Test
method deserializeEmpty (line 119) | @Test
method deserializeUsesRegistry (line 129) | @Test
method deserializeWrongClass (line 141) | @Test
method deserializeWrongType (line 168) | @Test
method deserializeWrongValue (line 195) | @Test
method serializeIsStreamed (line 211) | @Test
class ThrowingPhone (line 242) | private static final class ThrowingPhone extends AbstractMessageLite {
method ThrowingPhone (line 245) | private ThrowingPhone(Phone delegate) {
method writeTo (line 249) | @Override
method getSerializedSize (line 254) | @Override
method getParserForType (line 259) | @Override
method newBuilderForType (line 264) | @Override
method toBuilder (line 269) | @Override
method getDefaultInstanceForType (line 274) | @Override
method isInitialized (line 279) | @Override
FILE: retrofit-converters/scalars/src/main/java/retrofit2/converter/scalars/ScalarRequestBodyConverter.java
class ScalarRequestBodyConverter (line 23) | final class ScalarRequestBodyConverter<T> implements Converter<T, Reques...
method ScalarRequestBodyConverter (line 27) | private ScalarRequestBodyConverter() {}
method convert (line 29) | @Override
FILE: retrofit-converters/scalars/src/main/java/retrofit2/converter/scalars/ScalarResponseBodyConverters.java
class ScalarResponseBodyConverters (line 22) | final class ScalarResponseBodyConverters {
method ScalarResponseBodyConverters (line 23) | private ScalarResponseBodyConverters() {}
class StringResponseBodyConverter (line 25) | static final class StringResponseBodyConverter implements Converter<Re...
method convert (line 28) | @Override
class BooleanResponseBodyConverter (line 34) | static final class BooleanResponseBodyConverter implements Converter<R...
method convert (line 37) | @Override
class ByteResponseBodyConverter (line 43) | static final class ByteResponseBodyConverter implements Converter<Resp...
method convert (line 46) | @Override
class CharacterResponseBodyConverter (line 52) | static final class CharacterResponseBodyConverter implements Converter...
method convert (line 55) | @Override
class DoubleResponseBodyConverter (line 66) | static final class DoubleResponseBodyConverter implements Converter<Re...
method convert (line 69) | @Override
class FloatResponseBodyConverter (line 75) | static final class FloatResponseBodyConverter implements Converter<Res...
method convert (line 78) | @Override
class IntegerResponseBodyConverter (line 84) | static final class IntegerResponseBodyConverter implements Converter<R...
method convert (line 87) | @Override
class LongResponseBodyConverter (line 93) | static final class LongResponseBodyConverter implements Converter<Resp...
method convert (line 96) | @Override
class ShortResponseBodyConverter (line 102) | static final class ShortResponseBodyConverter implements Converter<Res...
method convert (line 105) | @Override
FILE: retrofit-converters/scalars/src/main/java/retrofit2/converter/scalars/ScalarsConverterFactory.java
class ScalarsConverterFactory (line 39) | public final class ScalarsConverterFactory extends Converter.Factory {
method create (line 40) | public static ScalarsConverterFactory create() {
method ScalarsConverterFactory (line 44) | private ScalarsConverterFactory() {}
method requestBodyConverter (line 46) | @Override
method responseBodyConverter (line 74) | @Override
FILE: retrofit-converters/scalars/src/test/java/retrofit2/converter/scalars/ScalarsConverterFactoryTest.java
class ScalarsConverterFactoryTest (line 36) | public final class ScalarsConverterFactoryTest {
type Service (line 37) | interface Service {
method object (line 38) | @POST("/")
method stringObject (line 41) | @POST("/")
method booleanPrimitive (line 44) | @POST("/")
method booleanObject (line 47) | @POST("/")
method bytePrimitive (line 50) | @POST("/")
method byteObject (line 53) | @POST("/")
method charPrimitive (line 56) | @POST("/")
method charObject (line 59) | @POST("/")
method doublePrimitive (line 62) | @POST("/")
method doubleObject (line 65) | @POST("/")
method floatPrimitive (line 68) | @POST("/")
method floatObject (line 71) | @POST("/")
method integerPrimitive (line 74) | @POST("/")
method integerObject (line 77) | @POST("/")
method longPrimitive (line 80) | @POST("/")
method longObject (line 83) | @POST("/")
method shortPrimitive (line 86) | @POST("/")
method shortObject (line 89) | @POST("/")
method object (line 92) | @GET("/")
method stringObject (line 95) | @GET("/")
method booleanObject (line 98) | @GET("/")
method byteObject (line 101) | @GET("/")
method charObject (line 104) | @GET("/")
method doubleObject (line 107) | @GET("/")
method floatObject (line 110) | @GET("/")
method integerObject (line 113) | @GET("/")
method longObject (line 116) | @GET("/")
method shortObject (line 119) | @GET("/")
method setUp (line 127) | @Before
method unsupportedRequestTypesNotMatched (line 137) | @Test
method supportedRequestTypes (line 161) | @Test
method unsupportedResponseTypesNotMatched (line 285) | @Test
method supportedResponseTypes (line 309) | @Test
FILE: retrofit-converters/scalars/src/test/java/retrofit2/converter/scalars/ScalarsConverterPrimitivesFactoryTest.java
class ScalarsConverterPrimitivesFactoryTest (line 34) | public final class ScalarsConverterPrimitivesFactoryTest {
type Service (line 35) | interface Service {
method booleanPrimitive (line 36) | @GET("/")
method bytePrimitive (line 39) | @GET("/")
method charPrimitive (line 42) | @GET("/")
method doublePrimitive (line 45) | @GET("/")
method floatPrimitive (line 48) | @GET("/")
method integerPrimitive (line 51) | @GET("/")
method longPrimitive (line 54) | @GET("/")
method shortPrimitive (line 57) | @GET("/")
class DirectCallIOException (line 61) | static class DirectCallIOException extends RuntimeException {
method DirectCallIOException (line 62) | DirectCallIOException(String message, IOException e) {
class DirectCallAdapterFactory (line 67) | static class DirectCallAdapterFactory extends CallAdapter.Factory {
method get (line 68) | @Override
method setUp (line 93) | @Before
method supportedResponseTypes (line 104) | @Test
FILE: retrofit-converters/simplexml/src/main/java/retrofit2/converter/simplexml/SimpleXmlConverterFactory.java
class SimpleXmlConverterFactory (line 36) | @Deprecated
method create (line 39) | public static SimpleXmlConverterFactory create() {
method create (line 44) | public static SimpleXmlConverterFactory create(Serializer serializer) {
method createNonStrict (line 49) | public static SimpleXmlConverterFactory createNonStrict() {
method createNonStrict (line 54) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method SimpleXmlConverterFactory (line 63) | private SimpleXmlConverterFactory(Serializer serializer, boolean stric...
method isStrict (line 68) | public boolean isStrict() {
method responseBodyConverter (line 72) | @Override
method requestBodyConverter (line 82) | @Override
FILE: retrofit-converters/simplexml/src/main/java/retrofit2/converter/simplexml/SimpleXmlRequestBodyConverter.java
class SimpleXmlRequestBodyConverter (line 26) | final class SimpleXmlRequestBodyConverter<T> implements Converter<T, Req...
method SimpleXmlRequestBodyConverter (line 32) | SimpleXmlRequestBodyConverter(Serializer serializer) {
method convert (line 36) | @Override
FILE: retrofit-converters/simplexml/src/main/java/retrofit2/converter/simplexml/SimpleXmlResponseBodyConverter.java
class SimpleXmlResponseBodyConverter (line 23) | final class SimpleXmlResponseBodyConverter<T> implements Converter<Respo...
method SimpleXmlResponseBodyConverter (line 28) | SimpleXmlResponseBodyConverter(Class<T> cls, Serializer serializer, bo...
method convert (line 34) | @Override
FILE: retrofit-converters/simplexml/src/test/java/retrofit2/converter/simplexml/MyObject.java
class MyObject (line 22) | @Default(value = DefaultType.FIELD)
method MyObject (line 27) | public MyObject() {}
method MyObject (line 29) | public MyObject(String message, int count) {
method setMessage (line 34) | public void setMessage(String message) {
method getMessage (line 38) | public String getMessage() {
method setCount (line 42) | public void setCount(int count) {
method getCount (line 46) | public int getCount() {
method hashCode (line 50) | @Override
method equals (line 58) | @Override
FILE: retrofit-converters/simplexml/src/test/java/retrofit2/converter/simplexml/SimpleXmlConverterFactoryTest.java
class SimpleXmlConverterFactoryTest (line 42) | public class SimpleXmlConverterFactoryTest {
type Service (line 43) | interface Service {
method get (line 44) | @GET("/")
method post (line 47) | @POST("/")
method wrongClass (line 50) | @GET("/")
method setUp (line 58) | @Before
method bodyWays (line 70) | @Test
method honorsCharacterEncoding (line 90) | @Test
method deserializeWrongValue (line 106) | @Test
method deserializeWrongClass (line 124) | @Test
FILE: retrofit-converters/wire/src/main/java/retrofit2/converter/wire/WireConverterFactory.java
class WireConverterFactory (line 34) | public final class WireConverterFactory extends Converter.Factory {
method create (line 40) | public static WireConverterFactory create() {
method WireConverterFactory (line 46) | private WireConverterFactory(boolean streaming) {
method withStreaming (line 56) | public WireConverterFactory withStreaming() {
method responseBodyConverter (line 60) | @Override
method requestBodyConverter (line 75) | @Override
FILE: retrofit-converters/wire/src/main/java/retrofit2/converter/wire/WireRequestBodyConverter.java
class WireRequestBodyConverter (line 26) | final class WireRequestBodyConverter<T extends Message<T, ?>> implements...
method WireRequestBodyConverter (line 32) | WireRequestBodyConverter(ProtoAdapter<T> adapter, boolean streaming) {
method convert (line 37) | @Override
FILE: retrofit-converters/wire/src/main/java/retrofit2/converter/wire/WireResponseBodyConverter.java
class WireResponseBodyConverter (line 24) | final class WireResponseBodyConverter<T extends Message<T, ?>>
method WireResponseBodyConverter (line 28) | WireResponseBodyConverter(ProtoAdapter<T> adapter) {
method convert (line 32) | @Override
FILE: retrofit-converters/wire/src/main/java/retrofit2/converter/wire/WireStreamingRequestBody.java
class WireStreamingRequestBody (line 27) | final class WireStreamingRequestBody<T extends Message<T, ?>> extends Re...
method WireStreamingRequestBody (line 31) | WireStreamingRequestBody(ProtoAdapter<T> adapter, T value) {
method contentType (line 36) | @Override
method writeTo (line 41) | @Override
FILE: retrofit-converters/wire/src/test/java/retrofit2/converter/wire/CrashingPhone.java
class CrashingPhone (line 16) | public final class CrashingPhone extends Message<CrashingPhone, Crashing...
method CrashingPhone (line 26) | public CrashingPhone(String number) {
method CrashingPhone (line 30) | public CrashingPhone(String number, ByteString unknownFields) {
method newBuilder (line 35) | @Override
method equals (line 43) | @Override
method hashCode (line 51) | @Override
method toString (line 62) | @Override
class Builder (line 69) | public static final class Builder extends Message.Builder<CrashingPhon...
method Builder (line 72) | public Builder() {}
method number (line 74) | public Builder number(String number) {
method build (line 79) | @Override
class ProtoAdapter_CrashingPhone (line 85) | private static final class ProtoAdapter_CrashingPhone extends ProtoAda...
method ProtoAdapter_CrashingPhone (line 86) | ProtoAdapter_CrashingPhone() {
method encodedSize (line 90) | @Override
method encode (line 96) | @Override
method decode (line 101) | @Override
method redact (line 122) | @Override
FILE: retrofit-converters/wire/src/test/java/retrofit2/converter/wire/Phone.java
class Phone (line 15) | public final class Phone extends Message<Phone, Phone.Builder> {
method Phone (line 25) | public Phone(String number) {
method Phone (line 29) | public Phone(String number, ByteString unknownFields) {
method newBuilder (line 34) | @Override
method equals (line 42) | @Override
method hashCode (line 50) | @Override
method toString (line 61) | @Override
class Builder (line 68) | public static final class Builder extends Message.Builder<Phone, Build...
method Builder (line 71) | public Builder() {}
method number (line 73) | public Builder number(String number) {
method build (line 78) | @Override
class ProtoAdapter_Phone (line 84) | private static final class ProtoAdapter_Phone extends ProtoAdapter<Pho...
method ProtoAdapter_Phone (line 85) | ProtoAdapter_Phone() {
method encodedSize (line 89) | @Override
method encode (line 95) | @Override
method decode (line 101) | @Override
method redact (line 122) | @Override
FILE: retrofit-converters/wire/src/test/java/retrofit2/converter/wire/WireConverterFactoryTest.java
class WireConverterFactoryTest (line 45) | @RunWith(TestParameterInjector.class)
type Service (line 47) | interface Service {
method get (line 48) | @GET("/")
method post (line 51) | @POST("/")
method postCrashing (line 54) | @POST("/")
method wrongClass (line 57) | @GET("/")
method wrongType (line 60) | @GET("/")
method WireConverterFactoryTest (line 69) | public WireConverterFactoryTest(@TestParameter boolean streaming) {
method serializeAndDeserialize (line 81) | @Test
method serializeIsStreamed (line 96) | @Test
method deserializeEmpty (line 126) | @Test
method deserializeWrongClass (line 136) | @Test
method deserializeWrongType (line 163) | @Test
method deserializeWrongValue (line 190) | @Test
FILE: retrofit-mock/src/main/java/retrofit2/mock/BehaviorCall.java
class BehaviorCall (line 33) | final class BehaviorCall<T> implements Call<T> {
method BehaviorCall (line 44) | BehaviorCall(NetworkBehavior behavior, ExecutorService backgroundExecu...
method clone (line 50) | @SuppressWarnings("CloneDoesntCallSuperClone") // We are a final type ...
method request (line 56) | @Override
method timeout (line 61) | @Override
method enqueue (line 66) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method isExecuted (line 127) | @Override
method execute (line 132) | @Override
method cancel (line 164) | @Override
method isCanceled (line 173) | @Override
FILE: retrofit-mock/src/main/java/retrofit2/mock/BehaviorDelegate.java
class BehaviorDelegate (line 40) | public final class BehaviorDelegate<T> {
method BehaviorDelegate (line 46) | BehaviorDelegate(
method returningResponse (line 54) | public T returningResponse(@Nullable Object response) {
method returning (line 58) | @SuppressWarnings("unchecked") // Single-interface proxy creation guar...
method parseServiceMethodAdapterInfo (line 98) | private static ServiceMethodAdapterInfo parseServiceMethodAdapterInfo(...
class CallParameterizedTypeImpl (line 129) | static final class CallParameterizedTypeImpl implements ParameterizedT...
method CallParameterizedTypeImpl (line 132) | CallParameterizedTypeImpl(Type bodyType) {
method getActualTypeArguments (line 136) | @Override
method getRawType (line 141) | @Override
method getOwnerType (line 146) | @Override
class ServiceMethodAdapterInfo (line 152) | static class ServiceMethodAdapterInfo {
method ServiceMethodAdapterInfo (line 163) | ServiceMethodAdapterInfo(boolean isSuspend, boolean wantsResponse, T...
FILE: retrofit-mock/src/main/java/retrofit2/mock/Calls.java
class Calls (line 29) | public final class Calls {
method defer (line 34) | public static <T> Call<T> defer(Callable<Call<T>> callable) {
method response (line 38) | public static <T> Call<T> response(@Nullable T successValue) {
method response (line 42) | public static <T> Call<T> response(Response<T> response) {
method failure (line 47) | public static <T> Call<T> failure(IOException failure) {
method failure (line 59) | public static <T> Call<T> failure(Throwable failure) {
method Calls (line 63) | private Calls() {
class FakeCall (line 67) | static final class FakeCall<T> implements Call<T> {
method FakeCall (line 73) | FakeCall(@Nullable Response<T> response, @Nullable Throwable error) {
method execute (line 81) | @Override
method sneakyThrow (line 96) | @SuppressWarnings({"unchecked", "TypeParameterUnusedInFormals"})
method enqueue (line 101) | @SuppressWarnings("ConstantConditions") // Guarding public API nulla...
method isExecuted (line 119) | @Override
method cancel (line 124) | @Override
method isCanceled (line 129) | @Override
method clone (line 134) | @Override
method request (line 139) | @Override
method timeout (line 147) | @Override
class DeferredCall (line 153) | static final class DeferredCall<T> implements Call<T> {
method DeferredCall (line 157) | DeferredCall(Callable<Call<T>> callable) {
method getDelegate (line 161) | private synchronized Call<T> getDelegate() {
method execute (line 174) | @Override
method enqueue (line 179) | @Override
method isExecuted (line 184) | @Override
method cancel (line 189) | @Override
method isCanceled (line 194) | @Override
method clone (line 199) | @Override
method request (line 204) | @Override
method timeout (line 209) | @Override
FILE: retrofit-mock/src/main/java/retrofit2/mock/MockRetrofit.java
class MockRetrofit (line 24) | public final class MockRetrofit {
method MockRetrofit (line 29) | MockRetrofit(Retrofit retrofit, NetworkBehavior behavior, ExecutorServ...
method retrofit (line 35) | public Retrofit retrofit() {
method networkBehavior (line 39) | public NetworkBehavior networkBehavior() {
method backgroundExecutor (line 43) | public Executor backgroundExecutor() {
method create (line 47) | @SuppressWarnings("unchecked") // Single-interface proxy creation guar...
class Builder (line 52) | public static final class Builder {
method Builder (line 57) | @SuppressWarnings("ConstantConditions") // Guarding public API nulla...
method networkBehavior (line 63) | @SuppressWarnings("ConstantConditions") // Guarding public API nulla...
method backgroundExecutor (line 70) | @SuppressWarnings("ConstantConditions") // Guarding public API nulla...
method build (line 77) | public MockRetrofit build() {
FILE: retrofit-mock/src/main/java/retrofit2/mock/MockRetrofitIOException.java
class MockRetrofitIOException (line 20) | final class MockRetrofitIOException extends IOException {
method MockRetrofitIOException (line 21) | MockRetrofitIOException() {
FILE: retrofit-mock/src/main/java/retrofit2/mock/NetworkBehavior.java
class NetworkBehavior (line 44) | public final class NetworkBehavior {
method create (line 51) | public static NetworkBehavior create() {
method create (line 59) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method NetworkBehavior (line 75) | private NetworkBehavior(Random random) {
method setDelay (line 83) | public void setDelay(long amount, TimeUnit unit) {
method delay (line 91) | public long delay(TimeUnit unit) {
method setVariancePercent (line 96) | public void setVariancePercent(int variancePercent) {
method variancePercent (line 102) | public int variancePercent() {
method setFailurePercent (line 107) | public void setFailurePercent(int failurePercent) {
method failurePercent (line 113) | public int failurePercent() {
method setFailureException (line 123) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method failureException (line 132) | public Throwable failureException() {
method errorPercent (line 137) | public int errorPercent() {
method setErrorPercent (line 142) | public void setErrorPercent(int errorPercent) {
method setErrorFactory (line 151) | @SuppressWarnings("ConstantConditions") // Guarding public API nullabi...
method createErrorResponse (line 160) | public Response<?> createErrorResponse() {
method calculateIsFailure (line 180) | public boolean calculateIsFailure() {
method calculateIsError (line 188) | public boolean calculateIsError() {
method calculateDelay (line 196) | public long calculateDelay(TimeUnit unit) {
method checkPercentageValidity (line 206) | private static void checkPercentageValidity(int percentage, String mes...
FILE: retrofit-mock/src/test/java/retrofit2/mock/BehaviorDelegateTest.java
class BehaviorDelegateTest (line 38) | public final class BehaviorDelegateTest {
type DoWorkService (line 39) | interface DoWorkService {
method response (line 40) | Call<String> response();
method failure (line 42) | Call<String> failure();
method setUp (line 49) | @Before
method syncFailureThrowsAfterDelay (line 72) | @Test
method asyncFailureTriggersFailureAfterDelay (line 91) | @Test
method syncSuccessReturnsAfterDelay (line 123) | @Test
method asyncSuccessCalledAfterDelay (line 139) | @Test
method syncFailureThrownAfterDelay (line 171) | @Test
method asyncFailureCalledAfterDelay (line 190) | @Test
method syncCanBeCanceled (line 222) | @Test
method asyncCanBeCanceled (line 250) | @Test
method syncCanceledBeforeStart (line 286) | @Test
method asyncCanBeCanceledBeforeStart (line 305) | @Test
FILE: retrofit-mock/src/test/java/retrofit2/mock/CallsTest.java
class CallsTest (line 34) | public final class CallsTest {
method bodyExecute (line 35) | @Test
method bodyEnqueue (line 41) | @Test
method responseExecute (line 60) | @Test
method responseEnqueue (line 75) | @Test
method enqueueNullThrows (line 116) | @Test
method responseCancelExecute (line 127) | @Test
method responseCancelEnqueue (line 142) | @Test
method failureExecute (line 167) | @Test
method failureExecuteCheckedException (line 181) | @Test
method failureEnqueue (line 195) | @Test
method cloneHasOwnState (line 218) | @Test
method deferredReturnExecute (line 228) | @Test
method deferredReturnEnqueue (line 247) | @Test
method deferredThrowExecute (line 282) | @Test
method deferredThrowEnqueue (line 298) | @Test
method deferredThrowUncheckedExceptionEnqueue (line 322) | @Test
FILE: retrofit-mock/src/test/java/retrofit2/mock/MockRetrofitTest.java
class MockRetrofitTest (line 11) | public final class MockRetrofitTest {
method retrofitNullThrows (line 16) | @Test
method retrofitPropagated (line 26) | @Test
method networkBehaviorNullThrows (line 32) | @Test
method networkBehaviorDefault (line 43) | @Test
method networkBehaviorPropagated (line 49) | @Test
method backgroundExecutorNullThrows (line 56) | @Test
method backgroundExecutorDefault (line 67) | @Test
method backgroundExecutorPropagated (line 73) | @Test
FILE: retrofit-mock/src/test/java/retrofit2/mock/NetworkBehaviorTest.java
class NetworkBehaviorTest (line 31) | public final class NetworkBehaviorTest {
method defaultThrowable (line 34) | @Test
method delayMustBePositive (line 43) | @Test
method varianceRestrictsRange (line 53) | @Test
method failureRestrictsRange (line 69) | @Test
method failureExceptionIsNotNull (line 85) | @Test
method errorRestrictsRange (line 95) | @Test
method errorFactoryIsNotNull (line 111) | @Test
method errorFactoryCannotReturnNull (line 121) | @Test
method errorFactoryCannotThrow (line 132) | @Test
method errorFactoryCannotReturnSuccess (line 148) | @Test
method errorFactoryCalledEachTime (line 159) | @Test
method failurePercentageIsAccurate (line 176) | @Test
method errorPercentageIsAccurate (line 193) | @Test
method delayVarianceIsAccurate (line 210) | @Test
FILE: retrofit/android-test/src/androidTest/java/retrofit2/BasicCallTest.java
class BasicCallTest (line 28) | public final class BasicCallTest {
type Service (line 31) | interface Service {
method getBody (line 32) | @GET("/") Call<ResponseBody> getBody();
method responseBody (line 35) | @Test public void responseBody() throws IOException {
FILE: retrofit/android-test/src/androidTest/java/retrofit2/CompletableFutureAndroidTest.java
class CompletableFutureAndroidTest (line 30) | @SdkSuppress(minSdkVersion = 24)
type Service (line 34) | interface Service {
method endpoint (line 35) | @GET("/")
method setUp (line 41) | @Before
method completableFutureApi24 (line 51) | @Test
FILE: retrofit/android-test/src/androidTest/java/retrofit2/DefaultMethodsAndroidTest.java
class DefaultMethodsAndroidTest (line 31) | public final class DefaultMethodsAndroidTest {
type Example (line 34) | interface Example {
method user (line 35) | @GET("/")
method user (line 38) | default Call<String> user() {
method failsOnApi24And25 (line 43) | @Test
method doesNotFailOnApi26 (line 61) | @Test
FILE: retrofit/android-test/src/androidTest/java/retrofit2/OptionalConverterFactoryAndroidTest.java
class OptionalConverterFactoryAndroidTest (line 31) | @SdkSuppress(minSdkVersion = 24)
type Service (line 33) | interface Service {
method optional (line 34) | @GET("/")
method object (line 37) | @GET("/")
method setUp (line 45) | @Before
method optionalApi24 (line 55) | @Test
method onlyMatchesOptional (line 63) | @Test
FILE: retrofit/android-test/src/androidTest/java/retrofit2/UriAndroidTest.java
class UriAndroidTest (line 32) | public final class UriAndroidTest {
type Service (line 36) | interface Service {
method method (line 37) | @GET
method setUp (line 43) | @Before
method getWithAndroidUriUrl (line 52) | @Test
method getWithAndroidUriUrlAbsolute (line 60) | @Test
FILE: retrofit/java-test/src/test/java/retrofit2/AnnotationArraySubject.java
class AnnotationArraySubject (line 13) | public final class AnnotationArraySubject extends Subject {
method annotationArrays (line 14) | public static Factory<AnnotationArraySubject, Annotation[]> annotation...
method assertThat (line 18) | public static AnnotationArraySubject assertThat(Annotation[] actual) {
method AnnotationArraySubject (line 24) | private AnnotationArraySubject(FailureMetadata metadata, Annotation[] ...
method hasAtLeastOneElementOfType (line 30) | public void hasAtLeastOneElementOfType(Class<? extends Annotation> cls) {
FILE: retrofit/java-test/src/test/java/retrofit2/CallAdapterTest.java
class CallAdapterTest (line 30) | public final class CallAdapterTest {
method parameterizedTypeInvalidIndex (line 31) | @Test
method parameterizedTypes (line 52) | @Test
method rawTypeThrowsOnNull (line 66) | @Test
method rawTypes (line 76) | @Test
class A (line 100) | @SuppressWarnings("unused") // Used reflectively.
method method (line 102) | T method() {
FILE: retrofit/java-test/src/test/java/retrofit2/CallTest.java
class CallTest (line 53) | public final class CallTest {
type Service (line 56) | interface Service {
method getString (line 57) | @GET("/")
method getBody (line 60) | @GET("/")
method getStreamingBody (line 63) | @GET("/")
method postString (line 67) | @POST("/")
method postRequestBody (line 70) | @POST("/{a}")
method http200Sync (line 74) | @Test
method http200Async (line 90) | @Test
method http404Sync (line 125) | @Test
method http404Async (line 142) | @Test
method transportProblemSync (line 178) | @Test
method transportProblemAsync (line 197) | @Test
method conversionProblemOutgoingSync (line 231) | @Test
method conversionProblemOutgoingAsync (line 261) | @Test
method conversionProblemIncomingSync (line 306) | @Test
method conversionProblemIncomingMaskedByConverterIsUnwrapped (line 335) | @Test
method conversionProblemIncomingAsync (line 391) | @Test
method http204SkipsConverter (line 435) | @Test
method http205SkipsConverter (line 462) | @Test
method converterBodyDoesNotLeakContentInIntermediateBuffers (line 489) | @Test
method executeCallOnce (line 516) | @Test
method successfulRequestResponseWhenMimeTypeMissing (line 535) | @Test
method responseBody (line 550) | @Test
method responseBodyBuffers (line 565) | @Test
method responseBodyStreams (line 587) | @Test
method rawResponseContentTypeAndLengthButNoSource (line 611) | @Test
method emptyResponse (line 637) | @Test
method reportsExecutedSync (line 655) | @Test
method reportsExecutedAsync (line 673) | @Test
method cancelBeforeExecute (line 698) | @Test
method cancelBeforeEnqueue (line 719) | @Test
method cloningExecutedRequestDoesNotCopyState (line 751) | @Test
method cancelRequest (line 770) | @Test
method cancelOkHttpRequest (line 808) | @Test
method requestBeforeExecuteCreates (line 849) | @Test
method requestThrowingBeforeExecuteFailsExecute (line 878) | @Test
method requestThrowingNonFatalErrorBeforeExecuteFailsExecute (line 917) | @Test
method requestAfterExecuteReturnsCachedValue (line 956) | @Test
method requestAfterExecuteThrowingAlsoThrows (line 985) | @Test
method requestAfterExecuteThrowingAlsoThrowsForNonFatalErrors (line 1024) | @Test
method requestBeforeEnqueueCreates (line 1063) | @Test
method requestThrowingBeforeEnqueueFailsEnqueue (line 1103) | @Test
method requestThrowingNonFatalErrorBeforeEnqueueFailsEnqueue (line 1151) | @Test
method requestAfterEnqueueReturnsCachedValue (line 1200) | @Test
method requestAfterEnqueueFailingThrows (line 1240) | @Test
method requestAfterEnqueueFailingThrowsForNonFatalErrors (line 1288) | @Test
method fatalErrorsAreNotCaughtRequest (line 1337) | @Test
method fatalErrorsAreNotCaughtEnqueue (line 1376) | @Test
method fatalErrorsAreNotCaughtExecute (line 1426) | @Test
method timeoutExceeded (line 1465) | @Test
method deadlineExceeded (line 1485) | @Test
method timeoutEnabledButNotExceeded (line 1505) | @Test
FILE: retrofit/java-test/src/test/java/retrofit2/CompletableFutureCallAdapterFactoryTest.java
class CompletableFutureCallAdapterFactoryTest (line 32) | public final class CompletableFutureCallAdapterFactoryTest {
method setUp (line 40) | @Before
method responseType (line 49) | @Test
method nonListenableFutureReturnsNull (line 76) | @Test
method rawTypeThrows (line 82) | @Test
method rawResponseTypeThrows (line 96) | @Test
FILE: retrofit/java-test/src/test/java/retrofit2/CompletableFutureTest.java
class CompletableFutureTest (line 33) | public final class CompletableFutureTest {
type Service (line 36) | interface Service {
method body (line 37) | @GET("/")
method response (line 40) | @GET("/")
method setUp (line 46) | @Before
method bodySuccess200 (line 56) | @Test
method bodySuccess404 (line 64) | @Test
method bodyFailure (line 79) | @Test
method responseSuccess200 (line 92) | @Test
method responseSuccess404 (line 102) | @Test
method responseFailure (line 112) | @Test
FILE: retrofit/java-test/src/test/java/retrofit2/DefaultCallAdapterFactoryTest.java
class DefaultCallAdapterFactoryTest (line 32) | @SuppressWarnings("unchecked")
method rawTypeThrows (line 39) | @Test
method responseType (line 51) | @Test
method adaptedCallExecute (line 64) | @Test
method adaptedCallCloneDeepCopy (line 81) | @Test
method adaptedCallCancel (line 100) | @Test
class EmptyCall (line 118) | static class EmptyCall implements Call<String> {
method enqueue (line 119) | @Override
method isExecuted (line 124) | @Override
method execute (line 129) | @Override
method cancel (line 134) | @Override
method isCanceled (line 139) | @Override
method clone (line 144) | @Override
method request (line 149) | @Override
method timeout (line 154) | @Override
FILE: retrofit/java-test/src/test/java/retrofit2/DefaultMethodsTest.java
class DefaultMethodsTest (line 29) | public final class DefaultMethodsTest {
type Example (line 32) | interface Example {
method user (line 33) | @GET("/")
method user (line 36) | default Call<String> user() {
method test (line 41) | @Test
FILE: retrofit/java-test/src/test/java/retrofit2/HttpExceptionTest.java
class HttpExceptionTest (line 23) | public final class HttpExceptionTest {
method response (line 24) | @Test
method nullResponseThrows (line 33) | @Test
FILE: retrofit/java-test/src/test/java/retrofit2/InvocationTest.java
class InvocationTest (line 37) | public final class InvocationTest {
type Example (line 38) | interface Example {
method postMethod (line 39) | @POST("/{p1}") //
method urlMethod (line 43) | @GET //
type ExampleSub (line 47) | interface ExampleSub extends Example {}
method invocationObjectOnCallAndRequestTag (line 49) | @Test
method invocationCorrectlyIdentifiesServiceMethodInvocation (line 69) | @Test
method annotationUrlAbsent (line 90) | @Test
method ofInstance (line 109) | @Test
method nullService (line 120) | @Test
method nullInstance (line 133) | @Test
method nullMethod (line 148) | @Test
method nullArguments (line 158) | @Test
method deprecatedNullMethod (line 168) | @Test
method deprecatedNullArguments (line 178) | @Test
method argumentsAreImmutable (line 188) | @Test
FILE: retrofit/java-test/src/test/java/retrofit2/Java8DefaultStaticMethodsInValidationTest.java
class Java8DefaultStaticMethodsInValidationTest (line 27) | public final class Java8DefaultStaticMethodsInValidationTest {
type Example (line 30) | interface Example {
method user (line 31) | @GET("/")
method user (line 34) | default Call<String> user() {
method staticMethod (line 38) | static String staticMethod() {
method test (line 43) | @Test
FILE: retrofit/java-test/src/test/java/retrofit2/MethodParameterReflectionTest.java
class MethodParameterReflectionTest (line 26) | public final class MethodParameterReflectionTest {
method paramIndexIsUsedWithoutParamReflection (line 30) | @Test
type ExampleWithParameterNames (line 44) | interface ExampleWithParameterNames {
method method (line 45) | @GET("/") //
method paramNameIsUsedWithParamReflection (line 49) | @Test
FILE: retrofit/java-test/src/test/java/retrofit2/NonFatalError.java
class NonFatalError (line 18) | final class NonFatalError extends Error {
method NonFatalError (line 19) | NonFatalError(String message) {
FILE: retrofit/java-test/src/test/java/retrofit2/OptionalConverterFactoryTest.java
class OptionalConverterFactoryTest (line 30) | public final class OptionalConverterFactoryTest {
type Service (line 31) | interface Service {
method optional (line 32) | @GET("/")
method object (line 35) | @GET("/")
method setUp (line 43) | @Before
method optional (line 53) | @Test
method onlyMatchesOptional (line 62) | @Test
FILE: retrofit/java-test/src/test/java/retrofit2/RequestFactoryBuilderTest.java
class RequestFactoryBuilderTest (line 24) | public final class RequestFactoryBuilderTest {
method pathParameterParsing (line 25) | @Test
method expectParams (line 45) | private static void expectParams(String path, String... expected) {
FILE: retrofit/java-test/src/test/java/retrofit2/RequestFactoryTest.java
class RequestFactoryTest (line 69) | @SuppressWarnings({"UnusedParameters", "unused"}) // Parameters inspecte...
method customMethodNoBody (line 73) | @Test
method customMethodWithBody (line 88) | @Test
method onlyOneEncodingIsAllowedMultipartFirst (line 104) | @Test
method onlyOneEncodingIsAllowedFormEncodingFirst (line 124) | @Test
method invalidPathParam (line 144) | @Test
method pathParamNotAllowedInQuery (line 165) | @Test
method multipleParameterAnnotationsNotAllowed (line 185) | @Test
method multipleParameterAnnotationsOnlyOneRetrofitAllowed (line 206) | @Test
method twoMethodsFail (line 218) | @Test
method lackingMethod (line 240) | @Test
method implicitMultipartForbidden (line 258) | @Test
method implicitMultipartWithPartMapForbidden (line 277) | @Test
method multipartFailsOnNonBodyMethod (line 296) | @Test
method multipartFailsWithNoParts (line 316) | @Test
method implicitFormEncodingByFieldForbidden (line 336) | @Test
method implicitFormEncodingByFieldMapForbidden (line 355) | @Test
method formEncodingFailsOnNonBodyMethod (line 374) | @Test
method formEncodingFailsWithNoParts (line 394) | @Test
method headersFailWhenEmptyOnMethod (line 414) | @Test
method headersFailWhenMalformed (line 433) | @Test
method pathParamNonPathParamAndTypedBytes (line 453) | @Test
method parameterWithoutAnnotation (line 472) | @Test
method nonBodyHttpMethodWithSingleEntity (line 491) | @Test
method queryMapMustBeAMap (line 509) | @Test
method queryMapSupportsSubclasses (line 528) | @Test
method queryMapRejectsNull (line 546) | @Test
method queryMapRejectsNullKeys (line 565) | @Test
method queryMapRejectsNullValues (line 589) | @Test
method getWithHeaderMap (line 614) | @Test
method headerMapMustBeAMapOrHeaders (line 636) | @Test
method headerMapSupportsSubclasses (line 656) | @Test
method headerMapRejectsNull (line 676) | @Test
method headerMapRejectsNullKeys (line 696) | @Test
method headerMapRejectsNullValues (line 721) | @Test
method getWithHeaders (line 746) | @Test
method getWithHeadersAndHeaderMap (line 771) | @Test
method headersRejectsNull (line 797) | @Test
method getWithHeaderMapAllowingUnsafeNonAsciiValues (line 818) | @Test
method twoBodies (line 841) | @Test
method bodyInNonBodyRequest (line 860) | @Test
method get (line 880) | @Test
method delete (line 895) | @Test
method headVoid (line 910) | @Test
method headWithoutVoidThrows (line 925) | @Ignore("This test is valid but isn't validated by RequestFactory so i...
method post (line 945) | @Test
method put (line 961) | @Test
method patch (line 977) | @Test
method options (line 993) | @Test
method getWithPathParam (line 1008) | @Test
method getWithUnusedAndInvalidNamedPathParam (line 1023) | @Test
method getWithEncodedPathParam (line 1039) | @Test
method getWithEncodedPathSegments (line 1054) | @Test
method getWithUnencodedPathSegmentsPreventsRequestSplitting (line 1069) | @Test
method getWithEncodedPathStillPreventsRequestSplitting (line 1085) | @Test
method pathParametersAndPathTraversal (line 1100) | @Test
method encodedPathParametersAndPathTraversal (line 1126) | @Test
method dotDotsOkayWhenNotFullPathSegment (line 1161) | @Test
method pathParamRequired (line 1177) | @Test
method getWithQueryParam (line 1196) | @Test
method getWithEncodedQueryParam (line 1211) | @Test
method queryParamOptionalOmitsQuery (line 1227) | @Test
method queryParamOptional (line 1239) | @Test
method getWithQueryUrlAndParam (line 1252) | @Test
method getWithQuery (line 1267) | @Test
method getWithPathAndQueryParam (line 1282) | @Test
method getWithQueryThenPathThrows (line 1300) | @Test
method getWithQueryNameThenPathThrows (line 1321) | @Test
method getWithQueryMapThenPathThrows (line 1342) | @Test
method getWithPathAndQueryQuestionMarkParam (line 1363) | @Test
method getWithPathAndQueryAmpersandParam (line 1380) | @Test
method getWithPathAndQueryHashParam (line 1396) | @Test
method getWithQueryParamList (line 1413) | @Test
method getWithQueryParamArray (line 1431) | @Test
method getWithQueryParamPrimitiveArray (line 1449) | @Test
method getWithQueryNameParam (line 1467) | @Test
method getWithEncodedQueryNameParam (line 1482) | @Test
method queryNameParamOptionalOmitsQuery (line 1497) | @Test
method getWithQueryNameParamList (line 1509) | @Test
method getWithQueryNameParamArray (line 1526) | @Test
method getWithQueryNameParamPrimitiveArray (line 1543) | @Test
method getWithQueryParamMap (line 1560) | @Test
method getWithEncodedQueryParamMap (line 1580) | @Test
method getAbsoluteUrl (line 1601) | @Test
method getWithStringUrl (line 1617) | @Test
method getWithJavaUriUrl (line 1633) | @Test
method getWithStringUrlAbsolute (line 1649) | @Test
method getWithJavaUriUrlAbsolute (line 1665) | @Test
method getWithUrlAbsoluteSameHost (line 1681) | @Test
method getWithHttpUrl (line 1697) | @Test
method getWithNullUrl (line 1713) | @Test
method getWithNonStringUrlThrows (line 1733) | @Test
method getUrlAndUrlParamThrows (line 1755) | @Test
method getWithoutUrlThrows (line 1776) | @Test
method getWithUrlThenPathThrows (line 1796) | @Test
method getWithPathThenUrlThrows (line 1817) | @Test
method getWithQueryThenUrlThrows (line 1838) | @Test
method getWithQueryNameThenUrlThrows (line 1859) | @Test
method getWithQueryMapThenUrlThrows (line 1880) | @Test
method getWithUrlThenQuery (line 1901) | @Test
method postWithUrl (line 1916) | @Test
method normalPostWithPathParam (line 1932) | @Test
method emptyBody (line 1948) | @Test
method customMethodEmptyBody (line 1963) | @Test
method bodyRequired (line 1978) | @Test
method bodyWithPathParams (line 1997) | @Test
method simpleMultipart (line 2014) | @Test
method multipartArray (line 2045) | @Test
method multipartRequiresName (line 2074) | @Test
method multipartIterableRequiresName (line 2096) | @Test
method multipartArrayRequiresName (line 2118) | @Test
method multipartOkHttpPartForbidsName (line 2140) | @Test
method multipartOkHttpPart (line 2162) | @Test
method multipartOkHttpIterablePart (line 2188) | @Test
method multipartOkHttpArrayPart (line 2219) | @Test
method multipartOkHttpPartWithFilename (line 2251) | @Test
method multipartIterable (line 2278) | @Test
method multipartIterableOkHttpPart (line 2307) | @Test
method multipartArrayOkHttpPart (line 2329) | @Test
method multipartWithEncoding (line 2351) | @Test
method multipartPartMap (line 2384) | @Test
method multipartPartMapWithEncoding (line 2417) | @Test
method multipartPartMapRejectsNonStringKeys (line 2452) | @Test
method multipartPartMapRejectsOkHttpPartValues (line 2474) | @Test
method multipartPartMapRejectsNull (line 2496) | @Test
method multipartPartMapRejectsNullKeys (line 2516) | @Test
method multipartPartMapRejectsNullValues (line 2542) | @Test
method multipartPartMapMustBeMap (line 2568) | @Test
method multipartPartMapSupportsSubclasses (line 2589) | @Test
method multipartNullRemovesPart (line 2613) | @Test
method multipartPartOptional (line 2637) | @Test
method simpleFormEncoded (line 2654) | @Test
method formEncodedWithEncodedNameFieldParam (line 2669) | @Test
method formEncodedFieldOptional (line 2682) | @Test
method formEncodedFieldList (line 2696) | @Test
method formEncodedFieldArray (line 2711) | @Test
method formEncodedFieldPrimitiveArray (line 2726) | @Test
method formEncodedWithEncodedNameFieldParamMap (line 2741) | @Test
method formEncodedFieldMap (line 2759) | @Test
method fieldMapRejectsNull (line 2777) | @Test
method fieldMapRejectsNullKeys (line 2797) | @Test
method fieldMapRejectsNullValues (line 2822) | @Test
method fieldMapMustBeAMap (line 2848) | @Test
method fieldMapSupportsSubclasses (line 2868) | @Test
method simpleHeaders (line 2889) | @Test
method simpleHeadersAllowingUnsafeNonAsciiValues (line 2908) | @Test
method headersDoNotOverwriteEachOther (line 2929) | @Test
method headerParamToString (line 2952) | @Test
method headerParam (line 2969) | @Test
method headerParamAllowingUnsafeNonAsciiValues (line 2988) | @Test
method headerParamList (line 3008) | @Test
method headerParamArray (line 3025) | @Test
method contentTypeAnnotationHeaderOverrides (line 3042) | @Test
method contentTypeAnnotationHeaderOverridesFormEncoding (line 3056) | @Test
method contentTypeAnnotationHeaderOverridesMultipart (line 3070) | @Test
method malformedContentTypeHeaderThrows (line 3087) | @Test
method contentTypeAnnotationHeaderAddsHeaderWithNoBodyGet (line 3108) | @Test
method contentTypeAnnotationHeaderAddsHeaderWithNoBodyDelete (line 3121) | @Test
method contentTypeParameterHeaderOverrides (line 3134) | @Test
method malformedContentTypeParameterThrows (line 3148) | @Test
method malformedAnnotationRelativeUrlThrows (line 3167) | @Test
method malformedParameterRelativeUrlThrows (line 3185) | @Test
method multipartPartsShouldBeInOrder (line 3203) | @Test
method queryParamsSkippedIfConvertedToNull (line 3226) | @Test
method queryParamMapsConvertedToNullShouldError (line 3245) | @Test
method fieldParamsSkippedIfConvertedToNull (line 3272) | @Test
method fieldParamMapsConvertedToNullShouldError (line 3292) | @Test
method tag (line 3320) | @Test
method tagPrimitive (line 3333) | @Test
method tagGeneric (line 3346) | @Test
method tagDuplicateFails (line 3360) | @Test
method tagGenericDuplicateFails (line 3381) | @Test
method assertBody (line 3402) | private static void assertBody(RequestBody body, String expected) {
method assertMalformedRequest (line 3413) | static void assertMalformedRequest(Class<?> cls, Object... args) {
FILE: retrofit/java-test/src/test/java/retrofit2/ResponseTest.java
class ResponseTest (line 27) | public final class ResponseTest {
method success (line 43) | @Test
method successNullAllowed (line 56) | @Test
method successWithHeaders (line 63) | @Test
method successWithNullHeadersThrows (line 77) | @Test
method successWithStatusCode (line 87) | @Test
method successWithRawResponse (line 99) | @Test
method successWithNullRawResponseThrows (line 112) | @Test
method successWithErrorRawResponseThrows (line 122) | @Test
method error (line 132) | @Test
method nullErrorThrows (line 153) | @Test
method errorWithSuccessCodeThrows (line 163) | @Test
method errorWithRawResponse (line 174) | @Test
method nullErrorWithRawResponseThrows (line 187) | @Test
method errorWithNullRawResponseThrows (line 197) | @Test
method errorWithSuccessRawResponseThrows (line 208) | @Test
FILE: retrofit/java-test/src/test/java/retrofit2/RetrofitTest.java
class RetrofitTest (line 65) | public final class RetrofitTest {
type CallMethod (line 68) | interface CallMethod {
method disallowed (line 69) | @GET("/")
method disallowed (line 72) | @POST("/")
method badType1 (line 75) | @GET("/")
method badType2 (line 78) | @GET("/")
method getResponseBody (line 81) | @GET("/")
method getResponseBodySkippedExecutor (line 84) | @SkipCallbackExecutor
method getVoid (line 88) | @GET("/")
method postRequestBody (line 91) | @POST("/")
method queryString (line 94) | @GET("/")
method queryObject (line 97) | @GET("/")
type FutureMethod (line 101) | interface FutureMethod {
method method (line 102) | @GET("/")
type Extending (line 106) | interface Extending extends CallMethod {}
type TypeParam (line 108) | interface TypeParam<T> {}
type ExtendingTypeParam (line 110) | interface ExtendingTypeParam extends TypeParam<String> {}
type StringService (line 112) | interface StringService {
method get (line 113) | @GET("/")
type UnresolvableResponseType (line 117) | interface UnresolvableResponseType {
method typeVariable (line 118) | @GET("/")
method typeVariableUpperBound (line 121) | @GET("/")
method crazy (line 124) | @GET("/")
method wildcard (line 127) | @GET("/")
method wildcardUpperBound (line 130) | @GET("/")
type UnresolvableParameterType (line 134) | interface UnresolvableParameterType {
method typeVariable (line 135) | @POST("/")
method typeVariableUpperBound (line 138) | @POST("/")
method crazy (line 141) | @POST("/")
method wildcard (line 144) | @POST("/")
method wildcardUpperBound (line 147) | @POST("/")
type VoidService (line 151) | interface VoidService {
method nope (line 152) | @GET("/")
type Annotated (line 156) | interface Annotated {
method method (line 157) | @GET("/")
method bodyParameter (line 161) | @POST("/")
method queryParameter (line 164) | @GET("/")
type MutableParameters (line 171) | interface MutableParameters {
method method (line 172) | @GET("/")
method objectMethodsStillWork (line 177) | @SuppressWarnings({"EqualsBetweenInconvertibleTypes", "EqualsIncompati...
method interfaceWithTypeParameterThrows (line 188) | @Test
method interfaceWithExtend (line 204) | @Test
method interfaceWithExtendWithTypeParameterThrows (line 215) | @Test
method cloneSharesStatefulInstances (line 233) | @Test
method builtInConvertersAbsentInCloneBuilder (line 285) | @Test
method responseTypeCannotBeRetrofitResponse (line 292) | @Test
method responseTypeCannotBeOkHttpResponse (line 308) | @Test
method voidReturnTypeNotAllowed (line 324) | @Test
method validateEagerlyDisabledByDefault (line 339) | @Test
method validateEagerlyDisabledByUser (line 347) | @Test
method validateEagerlyFailsAtCreation (line 356) | @Test
method callCallAdapterAddedByDefault (line 371) | @Test
method callCallCustomAdapter (line 378) | @Test
method customCallAdapter (line 416) | @Test
method methodAnnotationsPassedToCallAdapter (line 449) | @Test
method customCallAdapterMissingThrows (line 473) | @Test
method methodAnnotationsPassedToResponseBodyConverter (line 498) | @Test
method methodAndParameterAnnotationsPassedToRequestBodyConverter (line 521) | @Test
method parameterAnnotationsPassedToStringConverter (line 551) | @Test
method stringConverterCalledForString (line 575) | @Test
method stringConverterReturningNullResultsInDefault (line 597) | @Test
method missingConverterThrowsOnNonRequestBody (line 619) | @Test
method missingConverterThrowsOnNonResponseBody (line 644) | @Test
method requestBodyOutgoingAllowed (line 672) | @Test
method voidOutgoingAllowed (line 683) | @Test
method voidResponsesArePooled (line 694) | @Test
method responseBodyIncomingAllowed (line 709) | @Test
method unresolvableResponseTypeThrows (line 723) | @Test
method unresolvableParameterTypeThrows (line 786) | @Test
method baseUrlRequired (line 849) | @Test
method baseUrlNullThrows (line 859) | @Test
method baseUrlInvalidThrows (line 875) | @Test
method baseUrlNoTrailingSlashThrows (line 884) | @Test
method baseUrlStringPropagated (line 901) | @Test
method baseHttpUrlPropagated (line 908) | @Test
method baseJavaUrlPropagated (line 915) | @Test
method clientNullThrows (line 922) | @Test
method callFactoryDefault (line 932) | @Test
method callFactoryPropagated (line 938) | @Test
method callFactoryClientPropagated (line 949) | @Test
method callFactoryUsed (line 957) | @Test
method callFactoryReturningNullThrows (line 975) | @Test
method callFactoryThrowingPropagates (line 993) | @Test
method converterNullThrows (line 1015) | @Test
method converterFactoryDefault (line 1025) | @Test
method builtInConvertersFirstInClone (line 1033) | @Test
method requestConverterFactoryQueried (line 1057) | @Test
method requestConverterFactoryNoMatchThrows (line 1087) | @Test
method requestConverterFactorySkippedNoMatchThrows (line 1118) | @Test
method responseConverterFactoryQueried (line 1154) | @Test
method responseConverterFactoryNoMatchThrows (line 1182) | @Test
method responseConverterFactorySkippedNoMatchThrows (line 1213) | @Test
method stringConverterFactoryQueried (line 1249) | @Test
method converterFactoryPropagated (line 1277) | @Test
method callAdapterFactoryNullThrows (line 1285) | @Test
method callAdapterFactoryDefault (line 1295) | @Test
method callAdapterFactoryPropagated (line 1301) | @Test
method callAdapterFactoryQueried (line 1320) | @Test
method callAdapterFactoryQueriedCanDelegate (line 1354) | @Test
method callAdapterFactoryQueriedCanDelegateTwiceWithoutRecursion (line 1399) | @Test
method callAdapterFactoryNoMatchThrows (line 1459) | @Test
method callAdapterFactoryDelegateNoMatchThrows (line 1490) | @Test
method platformAwareAdapterAbsentInCloneBuilder (line 1530) | @Test
method callbackExecutorNullThrows (line 1537) | @Test
method callbackExecutorPropagated (line 1547) | @Test
method callbackExecutorUsedForSuccess (line 1558) | @Test
method callbackExecutorUsedForFailure (line 1595) | @Test
method skippedCallbackExecutorNotUsedForSuccess (line 1632) | @Test
method skippedCallbackExecutorNotUsedForFailure (line 1658) | @Test
method argumentCapture (line 1685) | @Test
method annotationParsingFailureObservedByWaitingThreads (line 1721) | @Test
FILE: retrofit/kotlin-test/src/test/java/retrofit2/KotlinRequestFactoryTest.java
class KotlinRequestFactoryTest (line 11) | public final class KotlinRequestFactoryTest {
method headUnit (line 12) | @Test
FILE: retrofit/kotlin-test/src/test/java/retrofit2/KotlinSuspendRawTest.java
class KotlinSuspendRawTest (line 31) | public final class KotlinSuspendRawTest {
type Service (line 34) | interface Service {
method body (line 35) | @GET("/")
method raw (line 39) | @Test
FILE: retrofit/kotlin-test/src/test/java/retrofit2/KotlinUnitTest.java
class KotlinUnitTest (line 29) | public final class KotlinUnitTest {
type Service (line 32) | interface Service {
method empty (line 33) | @GET("/")
method head (line 36) | @HEAD("/")
method unitGet (line 40) | @Test
method unitHead (line 52) | @Test
FILE: retrofit/robovm-test/src/main/java/retrofit2/RoboVmPlatformTest.java
class RoboVmPlatformTest (line 18) | public final class RoboVmPlatformTest {
method main (line 19) | public static void main(String[] args) {
method RoboVmPlatformTest (line 32) | private RoboVmPlatformTest() {
FILE: retrofit/src/main/java/retrofit2/AndroidMainExecutor.java
class AndroidMainExecutor (line 22) | final class AndroidMainExecutor implements Executor {
method execute (line 25) | @Override
FILE: retrofit/src/main/java/retrofit2/BuiltInConverters.java
class BuiltInConverters (line 27) | final class BuiltInConverters extends Converter.Factory {
method responseBodyConverter (line 29) | @Override
method requestBodyConverter (line 46) | @Override
class VoidResponseBodyConverter (line 58) | static final class VoidResponseBodyConverter implements Converter<Resp...
method convert (line 61) | @Override
class UnitResponseBodyConverter (line 68) | static final class UnitResponseBodyConverter implements Converter<Resp...
method convert (line 71) | @Override
class RequestBodyConverter (line 78) | static final class RequestBodyConverter implements Converter<RequestBo...
method convert (line 81) | @Override
class StreamingResponseBodyConverter (line 87) | static final class StreamingResponseBodyConverter
method convert (line 91) | @Override
class BufferingResponseBodyConverter (line 97) | static final class BufferingResponseBodyConverter
method convert (line 101) | @Override
class ToStringConverter (line 112) | static final class ToStringConverter implements Converter<Object, Stri...
method convert (line 115) | @Override
FILE: retrofit/src/main/java/retrofit2/BuiltInFactories.java
class BuiltInFactories (line 27) | class BuiltInFactories {
method createDefaultCallAdapterFactories (line 28) | List<? extends CallAdapter.Factory> createDefaultCallAdapterFactories(
method createDefaultConverterFactories (line 33) | List<? extends Converter.Factory> createDefaultConverterFactories() {
class Java8 (line 37) | @TargetApi(24)
method createDefaultCallAdapterFactories (line 39) | @Override
method createDefaultConverterFactories (line 47) | @Override
FILE: retrofit/src/main/java/retrofit2/Call.java
type Call (line 35) | public interface Call<T> extends Cloneable {
method execute (line 43) | Response<T> execute() throws IOException;
method enqueue (line 49) | void enqueue(Callback<T> callback);
method isExecuted (line 55) | boolean isExecuted();
method cancel (line 61) | void cancel();
method isCanceled (line 64) | boolean isCanceled();
method clone (line 70) | Call<T> clone();
method request (line 73) | Request request();
method timeout (line 80) | Timeout timeout();
FILE: retrofit/src/main/java/retrofit2/CallAdapter.java
type CallAdapter (line 28) | public interface CallAdapter<R, T> {
method responseType (line 37) | Type responseType();
method adapt (line 57) | T adapt(Call<R> call);
class Factory (line 63) | abstract class Factory {
method get (line 68) | public abstract @Nullable CallAdapter<?, ?> get(
method getParameterUpperBound (line 75) | protected static Type getParameterUpperBound(int index, Parameterize...
method getRawType (line 83) | protected static Class<?> getRawType(Type type) {
FILE: retrofit/src/main/java/retrofit2/Callback.java
type Callback (line 32) | public interface Callback<T> {
method onResponse (line 39) | void onResponse(Call<T> call, Response<T> response);
method onFailure (line 45) | void onFailure(Call<T> call, Throwable t);
FILE: retrofit/src/main/java/retrofit2/CompletableFutureCallAdapterFactory.java
class CompletableFutureCallAdapterFactory (line 26) | @IgnoreJRERequirement // Only added when CompletableFuture is available ...
method get (line 29) | @Override
class BodyCallAdapter (line 56) | @IgnoreJRERequirement
method BodyCallAdapter (line 60) | BodyCallAdapter(Type responseType) {
method responseType (line 64) | @Override
method adapt (line 69) | @Override
class BodyCallback (line 76) | @IgnoreJRERequirement
method BodyCallback (line 80) | public BodyCallback(CompletableFuture<R> future) {
method onResponse (line 84) | @Override
method onFailure (line 93) | @Override
class ResponseCallAdapter (line 100) | @IgnoreJRERequirement
method ResponseCallAdapter (line 105) | ResponseCallAdapter(Type responseType) {
method responseType (line 109) | @Override
method adapt (line 114) | @Override
class ResponseCallback (line 121) | @IgnoreJRERequirement
method ResponseCallback (line 125) | public ResponseCallback(CompletableFuture<Response<R>> future) {
method onResponse (line 129) | @Override
method onFailure (line 134) | @Override
class CallCancelCompletableFuture (line 141) | @IgnoreJRERequirement
method CallCancelCompletableFuture (line 145) | CallCancelCompletableFuture(Call<?> call) {
method cancel (line 149) | @Override
FILE: retrofit/src/main/java/retrofit2/Converter.java
type Converter (line 41) | public interface Converter<F, T> {
method convert (line 42) | @Nullable
class Factory (line 46) | abstract class Factory {
method responseBodyConverter (line 53) | public @Nullable Converter<ResponseBody, ?> responseBodyConverter(
method requestBodyConverter (line 63) | public @Nullable Converter<?, RequestBody> requestBodyConverter(
method stringConverter (line 78) | public @Nullable Converter<?, String> stringConverter(
method getParameterUpperBound (line 87) | protected static Type getParameterUpperBound(int index, Parameterize...
method getRawType (line 95) | protected static Class<?> getRawType(Type type) {
FILE: retrofit/src/main/java/retrofit2/DefaultCallAdapterFactory.java
class DefaultCallAdapterFactory (line 28) | final class DefaultCallAdapterFactory extends CallAdapter.Factory {
method DefaultCallAdapterFactory (line 31) | DefaultCallAdapterFactory(@Nullable Executor callbackExecutor) {
method get (line 35) | @Override
class ExecutorCallbackCall (line 65) | static final class ExecutorCallbackCall<T> implements Call<T> {
method ExecutorCallbackCall (line 69) | ExecutorCallbackCall(Executor callbackExecutor, Call<T> delegate) {
method enqueue (line 74) | @Override
method isExecuted (line 101) | @Override
method execute (line 106) | @Override
method cancel (line 111) | @Override
method isCanceled (line 116) | @Override
method clone (line 121) | @SuppressWarnings("CloneDoesntCallSuperClone") // Performing deep cl...
method request (line 127) | @Override
method timeout (line 132) | @Override
FILE: retrofit/src/main/java/retrofit2/DefaultMethodSupport.java
class DefaultMethodSupport (line 30) | final class DefaultMethodSupport {
method invoke (line 33) | @IgnoreJRERequirement // Only used on JVM or Android API 24+.
method DefaultMethodSupport (line 51) | private DefaultMethodSupport() {}
FILE: retrofit/src/main/java/retrofit2/HttpException.java
class HttpException (line 22) | public class HttpException extends RuntimeException {
method getMessage (line 23) | private static String getMessage(Response<?> response) {
method HttpException (line 32) | public HttpException(Response<?> response) {
method code (line 40) | public int code() {
method message (line 45) | public String message() {
method response (line 50) | public @Nullable Response<?> response() {
FILE: retrofit/src/main/java/retrofit2/HttpServiceMethod.java
class HttpServiceMethod (line 31) | abstract class HttpServiceMethod<ResponseT, ReturnT> extends ServiceMeth...
method parseAnnotations (line 37) | static <ResponseT, ReturnT> HttpServiceMethod<ResponseT, ReturnT> pars...
method createCallAdapter (line 123) | private static <ResponseT, ReturnT> CallAdapter<ResponseT, ReturnT> cr...
method createResponseConverter (line 133) | private static <ResponseT> Converter<ResponseBody, ResponseT> createRe...
method HttpServiceMethod (line 147) | HttpServiceMethod(
method invoke (line 156) | @Override
method adapt (line 163) | protected abstract @Nullable ReturnT adapt(Call<ResponseT> call, Objec...
class CallAdapted (line 165) | static final class CallAdapted<ResponseT, ReturnT> extends HttpService...
method CallAdapted (line 168) | CallAdapted(
method adapt (line 177) | @Override
class SuspendForResponse (line 183) | static final class SuspendForResponse<ResponseT> extends HttpServiceMe...
method SuspendForResponse (line 186) | SuspendForResponse(
method adapt (line 195) | @Override
class SuspendForBody (line 212) | static final class SuspendForBody<ResponseT> extends HttpServiceMethod...
method SuspendForBody (line 217) | SuspendForBody(
method adapt (line 230) | @Override
FILE: retrofit/src/main/java/retrofit2/Invocation.java
class Invocation (line 53) | public final class Invocation {
method of (line 54) | public static <T> Invocation of(
method of (line 68) | public static <T> Invocation of(Class<T> service, T instance, Method m...
method of (line 72) | @Deprecated
method Invocation (line 88) | Invocation(
method service (line 101) | public Class<?> service() {
method instance (line 111) | @Nullable
method method (line 116) | public Method method() {
method arguments (line 120) | public List<?> arguments() {
method annotationUrl (line 135) | @Nullable
method toString (line 140) | @Override
FILE: retrofit/src/main/java/retrofit2/OkHttpCall.java
class OkHttpCall (line 33) | final class OkHttpCall<T> implements Call<T> {
method OkHttpCall (line 51) | OkHttpCall(
method clone (line 64) | @SuppressWarnings("CloneDoesntCallSuperClone") // We are a final type ...
method request (line 70) | @Override
method timeout (line 79) | @Override
method getRawCall (line 92) | @GuardedBy("this")
method enqueue (line 118) | @Override
method isExecuted (line 187) | @Override
method execute (line 192) | @Override
method createRawCall (line 210) | private okhttp3.Call createRawCall() throws IOException {
method parseResponse (line 218) | Response<T> parseResponse(okhttp3.Response rawResponse) throws IOExcep...
method cancel (line 256) | @Override
method isCanceled (line 269) | @Override
class NoContentResponseBody (line 279) | static final class NoContentResponseBody extends ResponseBody {
method NoContentResponseBody (line 283) | NoContentResponseBody(@Nullable MediaType contentType, long contentL...
method contentType (line 288) | @Override
method contentLength (line 293) | @Override
method source (line 298) | @Override
class ExceptionCatchingResponseBody (line 304) | static final class ExceptionCatchingResponseBody extends ResponseBody {
method ExceptionCatchingResponseBody (line 309) | ExceptionCatchingResponseBody(ResponseBody delegate) {
method contentType (line 326) | @Override
method contentLength (line 331) | @Override
method source (line 336) | @Override
method close (line 341) | @Override
method throwIfCaught (line 346) | void throwIfCaught() throws IOException {
FILE: retrofit/src/main/java/retrofit2/OptionalConverterFactory.java
class OptionalConverterFactory (line 37) | @IgnoreJRERequirement // Only added when Optional is available (Java 8+ ...
method create (line 40) | public static OptionalConverterFactory create() {
method OptionalConverterFactory (line 44) | OptionalConverterFactory() {}
method responseBodyConverter (line 46) | @Override
class OptionalConverter (line 59) | @IgnoreJRERequirement
method OptionalConverter (line 63) | OptionalConverter(Converter<ResponseBody, T> delegate) {
method convert (line 67) | @Override
FILE: retrofit/src/main/java/retrofit2/ParameterHandler.java
class ParameterHandler (line 27) | abstract class ParameterHandler<T> {
method apply (line 28) | abstract void apply(RequestBuilder builder, @Nullable T value) throws ...
method iterable (line 30) | final ParameterHandler<Iterable<T>> iterable() {
method array (line 43) | final ParameterHandler<Object> array() {
class RelativeUrl (line 57) | static final class RelativeUrl extends ParameterHandler<Object> {
method RelativeUrl (line 61) | RelativeUrl(Method method, int p) {
method apply (line 66) | @Override
class Header (line 75) | static final class Header<T> extends ParameterHandler<T> {
method Header (line 80) | Header(String name, Converter<T, String> valueConverter, boolean all...
method apply (line 86) | @Override
class Path (line 97) | static final class Path<T> extends ParameterHandler<T> {
method Path (line 104) | Path(Method method, int p, String name, Converter<T, String> valueCo...
method apply (line 112) | @Override
class Query (line 122) | static final class Query<T> extends ParameterHandler<T> {
method Query (line 127) | Query(String name, Converter<T, String> valueConverter, boolean enco...
method apply (line 133) | @Override
class QueryName (line 144) | static final class QueryName<T> extends ParameterHandler<T> {
method QueryName (line 148) | QueryName(Converter<T, String> nameConverter, boolean encoded) {
method apply (line 153) | @Override
class QueryMap (line 160) | static final class QueryMap<T> extends ParameterHandler<Map<String, T>> {
method QueryMap (line 166) | QueryMap(Method method, int p, Converter<T, String> valueConverter, ...
method apply (line 173) | @Override
class HeaderMap (line 209) | static final class HeaderMap<T> extends ParameterHandler<Map<String, T...
method HeaderMap (line 215) | HeaderMap(
method apply (line 226) | @Override
class Headers (line 248) | static final class Headers extends ParameterHandler<okhttp3.Headers> {
method Headers (line 252) | Headers(Method method, int p) {
method apply (line 257) | @Override
class Field (line 266) | static final class Field<T> extends ParameterHandler<T> {
method Field (line 271) | Field(String name, Converter<T, String> valueConverter, boolean enco...
method apply (line 277) | @Override
class FieldMap (line 288) | static final class FieldMap<T> extends ParameterHandler<Map<String, T>> {
method FieldMap (line 294) | FieldMap(Method method, int p, Converter<T, String> valueConverter, ...
method apply (line 301) | @Override
class Part (line 337) | static final class Part<T> extends ParameterHandler<T> {
method Part (line 343) | Part(Method method, int p, okhttp3.Headers headers, Converter<T, Req...
method apply (line 350) | @Override
class RawPart (line 364) | static final class RawPart extends ParameterHandler<MultipartBody.Part> {
method RawPart (line 367) | private RawPart() {}
method apply (line 369) | @Override
class PartMap (line 377) | static final class PartMap<T> extends ParameterHandler<Map<String, T>> {
method PartMap (line 383) | PartMap(
method apply (line 391) | @Override
class Body (line 420) | static final class Body<T> extends ParameterHandler<T> {
method Body (line 425) | Body(Method method, int p, Converter<T, RequestBody> converter) {
method apply (line 431) | @Override
class Tag (line 446) | static final class Tag<T> extends ParameterHandler<T> {
method Tag (line 449) | Tag(Class<T> cls) {
method apply (line 453) | @Override
FILE: retrofit/src/main/java/retrofit2/Platform.java
class Platform (line 23) | final class Platform {
method Platform (line 55) | private Platform() {}
FILE: retrofit/src/main/java/retrofit2/Reflection.java
class Reflection (line 25) | class Reflection {
method isDefaultMethod (line 26) | boolean isDefaultMethod(Method method) {
method invokeDefaultMethod (line 30) | @Nullable
method describeMethodParameter (line 37) | String describeMethodParameter(Method method, int index) {
class Java8 (line 41) | @IgnoreJRERequirement // Only used on JVM.
method isDefaultMethod (line 43) | @Override
method invokeDefaultMethod (line 48) | @Override
method describeMethodParameter (line 55) | @Override
class Android24 (line 71) | @TargetApi(24)
method isDefaultMethod (line 74) | @Override
method invokeDefaultMethod (line 79) | @Override
FILE: retrofit/src/main/java/retrofit2/RequestBuilder.java
class RequestBuilder (line 31) | final class RequestBuilder {
method RequestBuilder (line 67) | RequestBuilder(
method setRelativeUrl (line 99) | void setRelativeUrl(Object relativeUrl) {
method addHeader (line 103) | void addHeader(String name, String value, boolean allowUnsafeNonAsciiV...
method addHeaders (line 117) | void addHeaders(Headers headers) {
method addPathParam (line 121) | void addPathParam(String name, String value, boolean encoded) {
method canonicalizeForPath (line 135) | private static String canonicalizeForPath(String input, boolean alread...
method canonicalizeForPath (line 155) | private static void canonicalizeForPath(
method addQueryParam (line 187) | void addQueryParam(String name, @Nullable String value, boolean encode...
method addFormField (line 207) | @SuppressWarnings("ConstantConditions") // Only called when isFormEnco...
method addPart (line 216) | @SuppressWarnings("ConstantConditions") // Only called when isMultipar...
method addPart (line 221) | @SuppressWarnings("ConstantConditions") // Only called when isMultipar...
method setBody (line 226) | void setBody(RequestBody body) {
method addTag (line 230) | <T> void addTag(Class<T> cls, @Nullable T value) {
method get (line 234) | Request.Builder get() {
class ContentTypeOverridingRequestBody (line 274) | private static class ContentTypeOverridingRequestBody extends RequestB...
method ContentTypeOverridingRequestBody (line 278) | ContentTypeOverridingRequestBody(RequestBody delegate, MediaType con...
method contentType (line 283) | @Override
method contentLength (line 288) | @Override
method writeTo (line 293) | @Override
FILE: retrofit/src/main/java/retrofit2/RequestFactory.java
class RequestFactory (line 65) | final class RequestFactory {
method parseAnnotations (line 66) | static RequestFactory parseAnnotations(Retrofit retrofit, Class<?> ser...
method RequestFactory (line 83) | RequestFactory(Builder builder) {
method create (line 98) | okhttp3.Request create(@Nullable Object instance, Object[] args) throw...
class Builder (line 145) | static final class Builder {
method Builder (line 177) | Builder(Retrofit retrofit, Class<?> service, Method method) {
method build (line 186) | RequestFactory build() {
method parseMethodAnnotation (line 232) | private void parseMethodAnnotation(Annotation annotation) {
method parseHttpMethodAndPath (line 270) | private void parseHttpMethodAndPath(String httpMethod, String value,...
method parseHeaders (line 304) | private Headers parseHeaders(String[] headers, boolean allowUnsafeNo...
method parseParameter (line 329) | private @Nullable ParameterHandler<?> parseParameter(
method parseParameterAnnotation (line 367) | @Nullable
method validateResolvableType (line 825) | private void validateResolvableType(int p, Type type) {
method validatePathName (line 832) | private void validatePathName(int p, String name) {
method parsePathParameters (line 851) | static Set<String> parsePathParameters(String path) {
method boxIfPrimitive (line 860) | private static Class<?> boxIfPrimitive(Class<?> type) {
FILE: retrofit/src/main/java/retrofit2/Response.java
class Response (line 26) | public final class Response<T> {
method success (line 28) | public static <T> Response<T> success(@Nullable T body) {
method success (line 43) | public static <T> Response<T> success(int code, @Nullable T body) {
method success (line 61) | public static <T> Response<T> success(@Nullable T body, Headers header...
method success (line 78) | public static <T> Response<T> success(@Nullable T body, okhttp3.Respon...
method error (line 90) | public static <T> Response<T> error(int code, ResponseBody body) {
method error (line 105) | public static <T> Response<T> error(ResponseBody body, okhttp3.Respons...
method Response (line 118) | private Response(
method raw (line 126) | public okhttp3.Response raw() {
method code (line 131) | public int code() {
method message (line 136) | public String message() {
method headers (line 141) | public Headers headers() {
method isSuccessful (line 146) | public boolean isSuccessful() {
method body (line 151) | public @Nullable T body() {
method errorBody (line 156) | public @Nullable ResponseBody errorBody() {
method toString (line 160) | @Override
FILE: retrofit/src/main/java/retrofit2/Retrofit.java
class Retrofit (line 65) | public final class Retrofit {
method Retrofit (line 89) | Retrofit(
method create (line 156) | @SuppressWarnings("unchecked") // Single-interface proxy creation guar...
method validateServiceInterface (line 182) | private void validateServiceInterface(Class<?> service) {
method loadServiceMethod (line 214) | ServiceMethod<?> loadServiceMethod(Class<?> service, Method method) {
method callFactory (line 269) | public okhttp3.Call.Factory callFactory() {
method baseUrl (line 274) | public HttpUrl baseUrl() {
method callAdapterFactories (line 282) | public List<CallAdapter.Factory> callAdapterFactories() {
method callAdapter (line 292) | public CallAdapter<?, ?> callAdapter(Type returnType, Annotation[] ann...
method nextCallAdapter (line 302) | public CallAdapter<?, ?> nextCallAdapter(
method converterFactories (line 337) | public List<Converter.Factory> converterFactories() {
method requestBodyConverter (line 347) | public <T> Converter<T, RequestBody> requestBodyConverter(
method nextRequestBodyConverter (line 358) | public <T> Converter<T, RequestBody> nextRequestBodyConverter(
method responseBodyConverter (line 400) | public <T> Converter<ResponseBody, T> responseBodyConverter(Type type,...
method nextResponseBodyConverter (line 410) | public <T> Converter<ResponseBody, T> nextResponseBodyConverter(
method stringConverter (line 447) | public <T> Converter<T, String> stringConverter(Type type, Annotation[...
method callbackExecutor (line 469) | public @Nullable Executor callbackExecutor() {
method newBuilder (line 473) | public Builder newBuilder() {
class Builder (line 483) | public static final class Builder {
method Builder (line 491) | public Builder() {}
method Builder (line 493) | Builder(Retrofit retrofit) {
method client (line 523) | public Builder client(OkHttpClient client) {
method callFactory (line 532) | public Builder callFactory(okhttp3.Call.Factory factory) {
method baseUrl (line 542) | public Builder baseUrl(URL baseUrl) {
method baseUrl (line 552) | public Builder baseUrl(String baseUrl) {
method baseUrl (line 607) | public Builder baseUrl(HttpUrl baseUrl) {
method addConverterFactory (line 618) | public Builder addConverterFactory(Converter.Factory factory) {
method addCallAdapterFactory (line 627) | public Builder addCallAdapterFactory(CallAdapter.Factory factory) {
method callbackExecutor (line 639) | public Builder callbackExecutor(Executor executor) {
method callAdapterFactories (line 645) | public List<CallAdapter.Factory> callAdapterFactories() {
method converterFactories (line 650) | public List<Converter.Factory> converterFactories() {
method validateEagerly (line 658) | public Builder validateEagerly(boolean validateEagerly) {
method build (line 669) | public Retrofit build() {
FILE: retrofit/src/main/java/retrofit2/ServiceMethod.java
class ServiceMethod (line 24) | abstract class ServiceMethod<T> {
method parseAnnotations (line 25) | static <T> ServiceMethod<T> parseAnnotations(Retrofit retrofit, Class<...
method invoke (line 42) | abstract @Nullable T invoke(Object instance, Object[] args);
FILE: retrofit/src/main/java/retrofit2/SkipCallbackExecutorImpl.java
class SkipCallbackExecutorImpl (line 21) | final class SkipCallbackExecutorImpl implements SkipCallbackExecutor {
method ensurePresent (line 24) | static Annotation[] ensurePresent(Annotation[] annotations) {
method annotationType (line 36) | @Override
method equals (line 41) | @Override
method hashCode (line 46) | @Override
method toString (line 51) | @Override
FILE: retrofit/src/main/java/retrofit2/Utils.java
class Utils (line 36) | final class Utils {
method Utils (line 39) | private Utils() {
method methodError (line 43) | static RuntimeException methodError(Method method, String message, Obj...
method methodError (line 47) | @SuppressWarnings("AnnotateFormatMethod")
method parameterError (line 60) | static RuntimeException parameterError(
method parameterError (line 66) | static RuntimeException parameterError(Method method, int p, String me...
method getRawType (line 71) | static Class<?> getRawType(Type type) {
method equals (line 109) | static boolean equals(Type a, Type b) {
method getGenericSupertype (line 159) | static Type getGenericSupertype(Type context, Class<?> rawType, Class<...
method indexOf (line 191) | private static int indexOf(Object[] array, Object toFind) {
method typeToString (line 198) | static String typeToString(Type type) {
method getSupertype (line 209) | static Type getSupertype(Type context, Class<?> contextRawType, Class<...
method resolve (line 215) | static Type resolve(Type context, Class<?> contextRawType, Type toReso...
method resolveTypeVariable (line 287) | private static Type resolveTypeVariable(
method declaringClassOf (line 307) | private static @Nullable Class<?> declaringClassOf(TypeVariable<?> typ...
method checkNotPrimitive (line 312) | static void checkNotPrimitive(Type type) {
method isAnnotationPresent (line 319) | static boolean isAnnotationPresent(Annotation[] annotations, Class<? e...
method buffer (line 328) | static ResponseBody buffer(final ResponseBody body) throws IOException {
method getParameterUpperBound (line 334) | static Type getParameterUpperBound(int index, ParameterizedType type) {
method getParameterLowerBound (line 347) | static Type getParameterLowerBound(int index, ParameterizedType type) {
method hasUnresolvableType (line 355) | static boolean hasUnresolvableType(@Nullable Type type) {
class ParameterizedTypeImpl (line 386) | static final class ParameterizedTypeImpl implements ParameterizedType {
method ParameterizedTypeImpl (line 391) | ParameterizedTypeImpl(@Nullable Type ownerType, Type rawType, Type.....
method getActualTypeArguments (line 408) | @Override
method getRawType (line 413) | @Override
method getOwnerType (line 418) | @Override
method equals (line 423) | @Override
method hashCode (line 428) | @Override
method toString (line 435) | @Override
class GenericArrayTypeImpl (line 448) | private static final class GenericArrayTypeImpl implements GenericArra...
method GenericArrayTypeImpl (line 451) | GenericArrayTypeImpl(Type componentType) {
method getGenericComponentType (line 455) | @Override
method equals (line 460) | @Override
method hashCode (line 465) | @Override
method toString (line 470) | @Override
class WildcardTypeImpl (line 481) | private static final class WildcardTypeImpl implements WildcardType {
method WildcardTypeImpl (line 485) | WildcardTypeImpl(Type[] upperBounds, Type[] lowerBounds) {
method getUpperBounds (line 503) | @Override
method getLowerBounds (line 508) | @Override
method equals (line 513) | @Override
method hashCode (line 518) | @Override
method toString (line 524) | @Override
method throwIfFatal (line 534) | static void throwIfFatal(Throwable t) {
method isUnit (line 547) | static boolean isUnit(Type type) {
FILE: retrofit/src/main/java14/retrofit2/DefaultMethodSupport.java
class DefaultMethodSupport (line 27) | final class DefaultMethodSupport {
method invoke (line 28) | @Nullable
method DefaultMethodSupport (line 38) | private DefaultMethodSupport() {}
FILE: retrofit/src/main/java16/retrofit2/DefaultMethodSupport.java
class DefaultMethodSupport (line 23) | final class DefaultMethodSupport {
method invoke (line 24) | @Nullable
method DefaultMethodSupport (line 31) | private DefaultMethodSupport() {}
FILE: retrofit/test-helpers/src/main/java/retrofit2/TestingUtils.java
class TestingUtils (line 23) | final class TestingUtils {
method buildRequest (line 24) | static <T> Request buildRequest(Class<T> cls, Retrofit.Builder builder...
method buildRequest (line 42) | static <T> Request buildRequest(Class<T> cls, Object... args) {
method onlyMethod (line 51) | static Method onlyMethod(Class c) {
method repeat (line 59) | static String repeat(char c, int times) {
FILE: retrofit/test-helpers/src/main/java/retrofit2/helpers/DelegatingCallAdapterFactory.java
class DelegatingCallAdapterFactory (line 23) | public final class DelegatingCallAdapterFactory extends CallAdapter.Fact...
method get (line 26) | @Override
FILE: retrofit/test-helpers/src/main/java/retrofit2/helpers/ExampleWithoutParameterNames.java
type ExampleWithoutParameterNames (line 23) | public interface ExampleWithoutParameterNames {
method method (line 24) | @GET("/")
FILE: retrofit/test-helpers/src/main/java/retrofit2/helpers/NonMatchingCallAdapterFactory.java
class NonMatchingCallAdapterFactory (line 24) | public final class NonMatchingCallAdapterFactory extends CallAdapter.Fac...
method get (line 27) | @Override
FILE: retrofit/test-helpers/src/main/java/retrofit2/helpers/NonMatchingConverterFactory.java
class NonMatchingConverterFactory (line 26) | public final class NonMatchingConverterFactory extends Converter.Factory {
method responseBodyConverter (line 29) | @Override
method requestBodyConverter (line 36) | @Override
method stringConverter (line 46) | @Override
FILE: retrofit/test-helpers/src/main/java/retrofit2/helpers/NullObjectConverterFactory.java
class NullObjectConverterFactory (line 25) | public final class NullObjectConverterFactory extends Converter.Factory {
method stringConverter (line 26) | @Override
FILE: retrofit/test-helpers/src/main/java/retrofit2/helpers/ObjectInstanceConverterFactory.java
class ObjectInstanceConverterFactory (line 25) | public final class ObjectInstanceConverterFactory extends Converter.Fact...
method responseBodyConverter (line 28) | @Override
FILE: retrofit/test-helpers/src/main/java/retrofit2/helpers/ToStringConverterFactory.java
class ToStringConverterFactory (line 27) | public class ToStringConverterFactory extends Converter.Factory {
method responseBodyConverter (line 30) | @Override
method requestBodyConverter (line 39) | @Override
FILE: samples/src/main/java/com/example/retrofit/AnnotatedConverters.java
class AnnotatedConverters (line 43) | final class AnnotatedConverters {
class AnnotatedConverterFactory (line 44) | public static final class AnnotatedConverterFactory extends Converter....
class Builder (line 47) | public static final class Builder {
method add (line 51) | public Builder add(Class<? extends Annotation> cls, Converter.Fact...
method build (line 62) | public AnnotatedConverterFactory build() {
method AnnotatedConverterFactory (line 67) | AnnotatedConverterFactory(Map<Class<? extends Annotation>, Converter...
method responseBodyConverter (line 71) | @Override
method requestBodyConverter (line 83) | @Override
class Library (line 109) | @Default(value = DefaultType.FIELD)
type Service (line 114) | interface Service {
method exampleMoshi (line 115) | @GET("/")
method exampleGson (line 119) | @GET("/")
method exampleSimpleXml (line 123) | @GET("/")
method exampleDefault (line 127) | @GET("/")
method main (line 131) | public static void main(String... args) throws IOException {
FILE: samples/src/main/java/com/example/retrofit/ChunkingConverter.java
class ChunkingConverter (line 41) | public final class ChunkingConverter {
class ChunkingConverterFactory (line 50) | static class ChunkingConverterFactory extends Converter.Factory {
method requestBodyConverter (line 51) | @Override
class Repo (line 88) | static class Repo {
method Repo (line 92) | Repo(String owner, String name) {
type Service (line 98) | interface Service {
method sendNormal (line 99) | @POST("/")
method sendChunked (line 102) | @POST("/")
method main (line 106) | public static void main(String... args) throws IOException, Interrupte...
FILE: samples/src/main/java/com/example/retrofit/Crawler.java
class Crawler (line 48) | public final class Crawler {
method Crawler (line 54) | public Crawler(PageService pageService) {
method crawlPage (line 58) | public void crawlPage(HttpUrl url) {
method main (line 98) | public static void main(String... args) throws Exception {
type PageService (line 122) | interface PageService {
method get (line 123) | @GET
class Page (line 127) | static class Page {
method Page (line 131) | Page(String title, List<String> links) {
class PageAdapter (line 137) | static final class PageAdapter implements Converter<ResponseBody, Page> {
method responseBodyConverter (line 140) | @Override
method convert (line 148) | @Override
FILE: samples/src/main/java/com/example/retrofit/DeserializeErrorBody.java
class DeserializeErrorBody (line 30) | public final class DeserializeErrorBody {
type Service (line 31) | interface Service {
method getUser (line 32) | @GET("/user")
class User (line 36) | static class User {
class ErrorBody (line 40) | static class ErrorBody {
method main (line 44) | public static void main(String... args) throws IOException {
FILE: samples/src/main/java/com/example/retrofit/DynamicBaseUrl.java
class DynamicBaseUrl (line 34) | public final class DynamicBaseUrl {
type Pop (line 35) | public interface Pop {
method robots (line 36) | @GET("robots.txt")
class HostSelectionInterceptor (line 40) | static final class HostSelectionInterceptor implements Interceptor {
method setHost (line 43) | public void setHost(String host) {
method intercept (line 47) | @Override
method main (line 59) | public static void main(String... args) throws IOException {
FILE: samples/src/main/java/com/example/retrofit/ErrorHandlingAdapter.java
class ErrorHandlingAdapter (line 36) | public final class ErrorHandlingAdapter {
type MyCallback (line 38) | interface MyCallback<T> {
method success (line 40) | void success(Response<T> response);
method unauthenticated (line 43) | void unauthenticated(Response<?> response);
method clientError (line 46) | void clientError(Response<?> response);
method serverError (line 49) | void serverError(Response<?> response);
method networkError (line 52) | void networkError(IOException e);
method unexpectedError (line 55) | void unexpectedError(Throwable t);
type MyCall (line 58) | interface MyCall<T> {
method cancel (line 59) | void cancel();
method enqueue (line 61) | void enqueue(MyCallback<T> callback);
method clone (line 63) | MyCall<T> clone();
class ErrorHandlingCallAdapterFactory (line 69) | public static class ErrorHandlingCallAdapterFactory extends CallAdapte...
method get (line 70) | @Override
class ErrorHandlingCallAdapter (line 85) | private static final class ErrorHandlingCallAdapter<R> implements Ca...
method ErrorHandlingCallAdapter (line 89) | ErrorHandlingCallAdapter(Type responseType, Executor callbackExecu...
method responseType (line 94) | @Override
method adapt (line 99) | @Override
class MyCallAdapter (line 107) | static class MyCallAdapter<T> implements MyCall<T> {
method MyCallAdapter (line 111) | MyCallAdapter(Call<T> call, Executor callbackExecutor) {
method cancel (line 116) | @Override
method enqueue (line 121) | @Override
method clone (line 160) | @Override
type HttpBinService (line 166) | interface HttpBinService {
method getIp (line 167) | @GET("/ip")
class Ip (line 171) | static class Ip {
method main (line 175) | public static void main(String... args) {
FILE: samples/src/main/java/com/example/retrofit/InvocationMetrics.java
class InvocationMetrics (line 31) | public final class InvocationMetrics {
type Browse (line 32) | public interface Browse {
method robots (line 33) | @GET("/robots.txt")
method favicon (line 36) | @GET("/favicon.ico")
method home (line 39) | @GET("/")
method page (line 42) | @GET
class InvocationLogger (line 46) | static final class InvocationLogger implements Interceptor {
method intercept (line 47) | @Override
method main (line 69) | public static void main(String... args) throws IOException {
FILE: samples/src/main/java/com/example/retrofit/JsonAndXmlConverters.java
class JsonAndXmlConverters (line 46) | public final class JsonAndXmlConverters {
class QualifiedTypeConverterFactory (line 53) | static class QualifiedTypeConverterFactory extends Converter.Factory {
method QualifiedTypeConverterFactory (line 57) | QualifiedTypeConverterFactory(Converter.Factory jsonFactory, Convert...
method responseBodyConverter (line 62) | @Override
method requestBodyConverter (line 76) | @Override
class User (line 96) | @Default(value = DefaultType.FIELD)
type Service (line 101) | interface Service {
method exampleJson (line 102) | @GET("/")
method exampleXml (line 106) | @GET("/")
method main (line 111) | public static void main(String... args) throws IOException {
FILE: samples/src/main/java/com/example/retrofit/JsonQueryParameters.java
class JsonQueryParameters (line 39) | public final class JsonQueryParameters {
class JsonStringConverterFactory (line 43) | static class JsonStringConverterFactory extends Converter.Factory {
method JsonStringConverterFactory (line 46) | JsonStringConverterFactory(Converter.Factory delegateFactory) {
method stringConverter (line 50) | @Override
class DelegateToStringConverter (line 66) | static class DelegateToStringConverter<T> implements Converter<T, St...
method DelegateToStringConverter (line 69) | DelegateToStringConverter(Converter<T, RequestBody> delegate) {
method convert (line 73) | @Override
class Filter (line 82) | static class Filter {
method Filter (line 85) | Filter(String userId) {
type Service (line 90) | interface Service {
method example (line 91) | @GET("/filter")
method main (line 95) | @SuppressWarnings("UnusedVariable")
FILE: samples/src/main/java/com/example/retrofit/RxJavaObserveOnMainThread.java
class RxJavaObserveOnMainThread (line 31) | public final class RxJavaObserveOnMainThread {
method main (line 32) | @SuppressWarnings("UnusedVariable")
class ObserveOnMainCallAdapterFactory (line 47) | static final class ObserveOnMainCallAdapterFactory extends CallAdapter...
method ObserveOnMainCallAdapterFactory (line 50) | ObserveOnMainCallAdapterFactory(Scheduler scheduler) {
method get (l
Condensed preview — 1073 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (6,724K chars).
[
{
"path": ".editorconfig",
"chars": 324,
"preview": "root = true\n\n[*]\nindent_size = 2\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[*.{kt,kts"
},
{
"path": ".gitattributes",
"chars": 53,
"preview": "* text=auto eol=lf\n\n*.bat text eol=crlf\n*.jar binary\n"
},
{
"path": ".github/CONTRIBUTING.md",
"chars": 645,
"preview": "Contributing\n============\n\nIf you would like to contribute code to Retrofit you can do so through GitHub by\nforking the "
},
{
"path": ".github/ISSUE_TEMPLATE.md",
"chars": 771,
"preview": "What kind of issue is this?\n\n - [ ] Question. This issue tracker is not the place for questions. If you want to ask how "
},
{
"path": ".github/pull_request_template.md",
"chars": 82,
"preview": "---\n\n- [ ] `CHANGELOG.md`'s \"Unreleased\" section has been updated, if applicable.\n"
},
{
"path": ".github/renovate.json5",
"chars": 657,
"preview": "{\n $schema: 'https://docs.renovatebot.com/renovate-schema.json',\n extends: [\n 'config:recommended',\n ],\n ignorePr"
},
{
"path": ".github/workflows/.java-version",
"chars": 3,
"preview": "25\n"
},
{
"path": ".github/workflows/build.yml",
"chars": 3988,
"preview": "name: build\n\non:\n pull_request: {}\n workflow_dispatch: {}\n push:\n branches:\n - 'trunk'\n tags-ignore:\n "
},
{
"path": ".github/workflows/release.yaml",
"chars": 1559,
"preview": "name: release\n\non:\n push:\n tags:\n - '**'\n\nenv:\n GRADLE_OPTS: \"-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon="
},
{
"path": ".gitignore",
"chars": 69,
"preview": "# Gradle\n.gradle\nbuild\n/reports\nlocal.properties\n\n# Idea\n.idea\n*.iml\n"
},
{
"path": "BUG-BOUNTY.md",
"chars": 361,
"preview": "Serious about security\n======================\n\nSquare recognizes the important contributions the security research commu"
},
{
"path": "CHANGELOG.md",
"chars": 44432,
"preview": "# Change Log\n\n## [Unreleased]\n[Unreleased]: https://github.com/square/retrofit/compare/3.0.0...HEAD\n\n**New**\n\n - Add exp"
},
{
"path": "LICENSE.txt",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "README.md",
"chars": 1768,
"preview": "Retrofit\n========\n\nA type-safe HTTP client for Android and Java.\n\nFor more information please see [the website][1].\n\n\nDo"
},
{
"path": "RELEASING.md",
"chars": 863,
"preview": "# Releasing\n\n1. Update the `VERSION_NAME` in `gradle.properties` to the release version.\n\n2. Update the `CHANGELOG.md`:\n"
},
{
"path": "build.gradle",
"chars": 3315,
"preview": "import net.ltgt.gradle.errorprone.CheckSeverity\n\nbuildscript {\n dependencies {\n classpath libs.androidPlugin\n cla"
},
{
"path": "gradle/libs.versions.toml",
"chars": 4880,
"preview": "# Copyright (C) 2021 Square, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use "
},
{
"path": "gradle/wrapper/gradle-wrapper.properties",
"chars": 252,
"preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
},
{
"path": "gradle.properties",
"chars": 865,
"preview": "GROUP=com.squareup.retrofit2\nVERSION_NAME=3.1.0-SNAPSHOT\n\nPOM_URL=https://github.com/square/retrofit\nPOM_SCM_URL=https:/"
},
{
"path": "gradlew",
"chars": 8739,
"preview": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "gradlew.bat",
"chars": 2966,
"preview": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (th"
},
{
"path": "retrofit/android-test/build.gradle",
"chars": 1259,
"preview": "apply plugin: 'com.android.library'\n\nandroid {\n compileSdk = 36\n namespace 'retrofit2.android'\n\n defaultConfig {\n "
},
{
"path": "retrofit/android-test/src/androidTest/java/retrofit2/BasicCallTest.java",
"chars": 1449,
"preview": "/*\n * Copyright (C) 2020 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/android-test/src/androidTest/java/retrofit2/CompletableFutureAndroidTest.java",
"chars": 1761,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/android-test/src/androidTest/java/retrofit2/DefaultMethodsAndroidTest.java",
"chars": 2541,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/android-test/src/androidTest/java/retrofit2/OptionalConverterFactoryAndroidTest.java",
"chars": 2098,
"preview": "/*\n * Copyright (C) 2017 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/android-test/src/androidTest/java/retrofit2/UriAndroidTest.java",
"chars": 2088,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/android-test/src/main/AndroidManifest.xml",
"chars": 200,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <uses-permission android:name=\"android.permissio"
},
{
"path": "retrofit/build.gradle",
"chars": 1559,
"preview": "apply plugin: 'java-library'\napply plugin: 'org.jetbrains.kotlin.jvm'\napply plugin: 'com.vanniktech.maven.publish'\n\ndef "
},
{
"path": "retrofit/gradle.properties",
"chars": 105,
"preview": "POM_ARTIFACT_ID=retrofit\nPOM_NAME=Retrofit\nPOM_DESCRIPTION=A type-safe HTTP client for Android and Java.\n"
},
{
"path": "retrofit/java-test/README.md",
"chars": 231,
"preview": "# Retrofit Java Tests\n\nThese are in a separate module for two reasons:\n\n- It ensures optional dependencies (Kotlin stuff"
},
{
"path": "retrofit/java-test/build.gradle",
"chars": 1199,
"preview": "apply plugin: 'java-library'\n\ndependencies {\n testImplementation projects.retrofit\n testImplementation projects.retrof"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/AnnotationArraySubject.java",
"chars": 1206,
"preview": "package retrofit2;\n\nimport static com.google.common.truth.Fact.simpleFact;\nimport static com.google.common.truth.Truth.a"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/CallAdapterTest.java",
"chars": 3758,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/CallTest.java",
"chars": 48666,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/CompletableFutureCallAdapterFactoryTest.java",
"chars": 4204,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/CompletableFutureTest.java",
"chars": 3791,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/DefaultCallAdapterFactoryTest.java",
"chars": 5023,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/DefaultMethodsTest.java",
"chars": 1832,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/HttpExceptionTest.java",
"chars": 1319,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/InvocationTest.java",
"chars": 6765,
"preview": "/*\n * Copyright (C) 2018 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/Java8DefaultStaticMethodsInValidationTest.java",
"chars": 1518,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/MethodParameterReflectionTest.java",
"chars": 2012,
"preview": "/*\n * Copyright (C) 2024 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/NonFatalError.java",
"chars": 723,
"preview": "/*\n * Copyright (C) 2020 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/OptionalConverterFactoryTest.java",
"chars": 2049,
"preview": "/*\n * Copyright (C) 2017 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/RequestFactoryBuilderTest.java",
"chars": 1917,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/RequestFactoryTest.java",
"chars": 103363,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/ResponseTest.java",
"chars": 7325,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/java-test/src/test/java/retrofit2/RetrofitTest.java",
"chars": 60717,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/kotlin-test/build.gradle",
"chars": 305,
"preview": "apply plugin: 'org.jetbrains.kotlin.jvm'\n\ndependencies {\n testImplementation projects.retrofit\n testImplementation pro"
},
{
"path": "retrofit/kotlin-test/src/test/java/retrofit2/KotlinExtensionsTest.kt",
"chars": 1002,
"preview": "/*\n * Copyright (C) 2018 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/kotlin-test/src/test/java/retrofit2/KotlinRequestFactoryTest.java",
"chars": 702,
"preview": "package retrofit2;\n\nimport kotlin.Unit;\nimport okhttp3.Request;\nimport org.junit.Test;\nimport retrofit2.http.HEAD;\n\nimpo"
},
{
"path": "retrofit/kotlin-test/src/test/java/retrofit2/KotlinSuspendRawTest.java",
"chars": 1711,
"preview": "/*\n * Copyright (C) 2018 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/kotlin-test/src/test/java/retrofit2/KotlinSuspendTest.kt",
"chars": 12657,
"preview": "/*\n * Copyright (C) 2018 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/kotlin-test/src/test/java/retrofit2/KotlinUnitTest.java",
"chars": 1964,
"preview": "/*\n * Copyright (C) 2018 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/robovm-test/build.gradle",
"chars": 822,
"preview": "// Normally we want all buildscript classpath dependencies to be at the root so that they\n// participate in a single rou"
},
{
"path": "retrofit/robovm-test/src/main/java/retrofit2/RoboVmPlatformTest.java",
"chars": 1163,
"preview": "/*\n * Copyright (C) 2020 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/AndroidMainExecutor.java",
"chars": 914,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/BuiltInConverters.java",
"chars": 3688,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/BuiltInFactories.java",
"chars": 1724,
"preview": "/*\n * Copyright (C) 2024 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/Call.java",
"chars": 2960,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/CallAdapter.java",
"chars": 3226,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/Callback.java",
"chars": 1710,
"preview": "/*\n * Copyright (C) 2012 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/CompletableFutureCallAdapterFactory.java",
"chars": 4982,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/Converter.java",
"chars": 3830,
"preview": "/*\n * Copyright (C) 2012 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/DefaultCallAdapterFactory.java",
"chars": 4151,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/DefaultMethodSupport.java",
"chars": 1897,
"preview": "/*\n * Copyright (C) 2024 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/HttpException.java",
"chars": 1584,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/HttpServiceMethod.java",
"chars": 10991,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/Invocation.java",
"chars": 4863,
"preview": "/*\n * Copyright (C) 2018 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/KotlinExtensions.kt",
"chars": 4131,
"preview": "/*\n * Copyright (C) 2018 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/OkHttpCall.java",
"chars": 9566,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/OptionalConverterFactory.java",
"chars": 2630,
"preview": "/*\n * Copyright (C) 2017 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/ParameterHandler.java",
"chars": 14776,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/Platform.java",
"chars": 1681,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/Reflection.java",
"chars": 2937,
"preview": "/*\n * Copyright (C) 2024 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/RequestBuilder.java",
"chars": 10172,
"preview": "/*\n * Copyright (C) 2012 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/RequestFactory.java",
"chars": 36102,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/Response.java",
"chars": 5393,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/Retrofit.java",
"chars": 28447,
"preview": "/*\n * Copyright (C) 2012 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/ServiceMethod.java",
"chars": 1517,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/SkipCallbackExecutor.java",
"chars": 1934,
"preview": "/*\n * Copyright (C) 2019 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/SkipCallbackExecutorImpl.java",
"chars": 1798,
"preview": "/*\n * Copyright (C) 2019 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/Utils.java",
"chars": 19991,
"preview": "/*\n * Copyright (C) 2008 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
},
{
"path": "retrofit/src/main/java/retrofit2/http/Body.java",
"chars": 1416,
"preview": "/*\n * Copyright (C) 2011 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/DELETE.java",
"chars": 1370,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/Field.java",
"chars": 2309,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/FieldMap.java",
"chars": 1557,
"preview": "/*\n * Copyright (C) 2014 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/FormUrlEncoded.java",
"chars": 1365,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/GET.java",
"chars": 1364,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/HEAD.java",
"chars": 1366,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/HTTP.java",
"chars": 1901,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/Header.java",
"chars": 2041,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/HeaderMap.java",
"chars": 2178,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/Headers.java",
"chars": 1870,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/Multipart.java",
"chars": 1074,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/OPTIONS.java",
"chars": 1373,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/PATCH.java",
"chars": 1368,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/POST.java",
"chars": 1366,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/PUT.java",
"chars": 1364,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/Part.java",
"chars": 2398,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/PartMap.java",
"chars": 1855,
"preview": "/*\n * Copyright (C) 2014 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/Path.java",
"chars": 2191,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/Query.java",
"chars": 2778,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/QueryMap.java",
"chars": 2267,
"preview": "/*\n * Copyright (C) 2014 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/QueryName.java",
"chars": 2128,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/Streaming.java",
"chars": 1118,
"preview": "/*\n * Copyright (C) 2014 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/Tag.java",
"chars": 1473,
"preview": "/*\n * Copyright (C) 2019 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/Url.java",
"chars": 1344,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/http/package-info.java",
"chars": 135,
"preview": "// Copyright 2014 Square, Inc.\n\n/** Annotations for interface methods to control the HTTP request behavior. */\npackage r"
},
{
"path": "retrofit/src/main/java/retrofit2/internal/EverythingIsNonNull.java",
"chars": 1223,
"preview": "/*\n * Copyright (C) 2018 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java/retrofit2/package-info.java",
"chars": 314,
"preview": "// Copyright 2014 Square, Inc.\n\n/**\n * Retrofit turns your REST API into a Java interface.\n *\n * <pre>\n * public interfa"
},
{
"path": "retrofit/src/main/java14/retrofit2/DefaultMethodSupport.java",
"chars": 1258,
"preview": "/*\n * Copyright (C) 2024 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/java16/retrofit2/DefaultMethodSupport.java",
"chars": 1103,
"preview": "/*\n * Copyright (C) 2024 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/src/main/resources/META-INF/proguard/retrofit2.pro",
"chars": 2080,
"preview": "# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and\n# EnclosingMethod is req"
},
{
"path": "retrofit/test-helpers/build.gradle",
"chars": 111,
"preview": "apply plugin: 'java-library'\n\ndependencies {\n api projects.retrofit\n\n compileOnly libs.findBugsAnnotations\n}\n"
},
{
"path": "retrofit/test-helpers/src/main/java/retrofit2/TestingUtils.java",
"chars": 2031,
"preview": "/*\n * Copyright (C) 2013 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/test-helpers/src/main/java/retrofit2/helpers/DelegatingCallAdapterFactory.java",
"chars": 1062,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/test-helpers/src/main/java/retrofit2/helpers/ExampleWithoutParameterNames.java",
"chars": 909,
"preview": "/*\n * Copyright (C) 2024 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/test-helpers/src/main/java/retrofit2/helpers/NonMatchingCallAdapterFactory.java",
"chars": 1063,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/test-helpers/src/main/java/retrofit2/helpers/NonMatchingConverterFactory.java",
"chars": 1552,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/test-helpers/src/main/java/retrofit2/helpers/NullObjectConverterFactory.java",
"chars": 1179,
"preview": "/*\n * Copyright (C) 2017 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/test-helpers/src/main/java/retrofit2/helpers/ObjectInstanceConverterFactory.java",
"chars": 1189,
"preview": "/*\n * Copyright (C) 2017 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit/test-helpers/src/main/java/retrofit2/helpers/ToStringConverterFactory.java",
"chars": 1591,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/README.md",
"chars": 470,
"preview": "Retrofit Adapters\n=================\n\nRetrofit ships with a default adapter for executing `Call` instances. The child mod"
},
{
"path": "retrofit-adapters/guava/README.md",
"chars": 1267,
"preview": "Guava Adapter\n==============\n\nAn `Adapter` for adapting [Guava][1] `ListenableFuture`.\n\n\nUsage\n-----\n\nAdd `GuavaCallAdap"
},
{
"path": "retrofit-adapters/guava/build.gradle",
"chars": 378,
"preview": "apply plugin: 'java-library'\napply plugin: 'com.vanniktech.maven.publish'\n\ndependencies {\n api projects.retrofit\n api "
},
{
"path": "retrofit-adapters/guava/gradle.properties",
"chars": 123,
"preview": "POM_ARTIFACT_ID=adapter-guava\nPOM_NAME=Adapter: Guava\nPOM_DESCRIPTION=A Retrofit CallAdapter for Guava's ListenableFutur"
},
{
"path": "retrofit-adapters/guava/src/main/java/retrofit2/adapter/guava/GuavaCallAdapterFactory.java",
"chars": 5691,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/guava/src/main/java/retrofit2/adapter/guava/HttpException.java",
"chars": 872,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/guava/src/main/java/retrofit2/adapter/guava/package-info.java",
"chars": 73,
"preview": "@retrofit2.internal.EverythingIsNonNull\npackage retrofit2.adapter.guava;\n"
},
{
"path": "retrofit-adapters/guava/src/test/java/retrofit2/adapter/guava/GuavaCallAdapterFactoryTest.java",
"chars": 4272,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/guava/src/test/java/retrofit2/adapter/guava/ListenableFutureTest.java",
"chars": 3988,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/guava/src/test/java/retrofit2/adapter/guava/StringConverterFactory.java",
"chars": 1365,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/java8/README.md",
"chars": 315,
"preview": "Java 8 Adapter (Deprecated)\n===========================\n\nA call adapter [Java 8's `CompletableFuture`][1].\n\nThis adapter"
},
{
"path": "retrofit-adapters/java8/build.gradle",
"chars": 392,
"preview": "apply plugin: 'java-library'\napply plugin: 'com.vanniktech.maven.publish'\n\ndependencies {\n api projects.retrofit\n comp"
},
{
"path": "retrofit-adapters/java8/gradle.properties",
"chars": 126,
"preview": "POM_ARTIFACT_ID=adapter-java8\nPOM_NAME=Adapter: Java 8\nPOM_DESCRIPTION=A Retrofit CallAdapter for Java 8's CompletableFu"
},
{
"path": "retrofit-adapters/java8/src/main/java/retrofit2/adapter/java8/HttpException.java",
"chars": 872,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/java8/src/main/java/retrofit2/adapter/java8/Java8CallAdapterFactory.java",
"chars": 5921,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/java8/src/main/java/retrofit2/adapter/java8/package-info.java",
"chars": 73,
"preview": "@retrofit2.internal.EverythingIsNonNull\npackage retrofit2.adapter.java8;\n"
},
{
"path": "retrofit-adapters/java8/src/test/java/retrofit2/adapter/java8/CompletableFutureTest.java",
"chars": 3985,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/java8/src/test/java/retrofit2/adapter/java8/Java8CallAdapterFactoryTest.java",
"chars": 4272,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/java8/src/test/java/retrofit2/adapter/java8/StringConverterFactory.java",
"chars": 1365,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/README.md",
"chars": 1959,
"preview": "RxJava Adapter\n==============\n\nAn `Adapter` for adapting [RxJava 1.x][1] types.\n\nAvailable types:\n\n * `Observable<T>`, `"
},
{
"path": "retrofit-adapters/rxjava/build.gradle",
"chars": 411,
"preview": "apply plugin: 'java-library'\napply plugin: 'com.vanniktech.maven.publish'\n\ndependencies {\n api projects.retrofit\n api "
},
{
"path": "retrofit-adapters/rxjava/gradle.properties",
"chars": 121,
"preview": "POM_ARTIFACT_ID=adapter-rxjava\nPOM_NAME=Adapter: RxJava\nPOM_DESCRIPTION=A Retrofit CallAdapter for RxJava's stream types"
},
{
"path": "retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/BodyOnSubscribe.java",
"chars": 3180,
"preview": "/*\n * Copyright (C) 2016 Jake Wharton\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/CallArbiter.java",
"chars": 5256,
"preview": "/*\n * Copyright (C) 2016 Jake Wharton\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/CallEnqueueOnSubscribe.java",
"chars": 1718,
"preview": "/*\n * Copyright (C) 2016 Jake Wharton\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/CallExecuteOnSubscribe.java",
"chars": 1527,
"preview": "/*\n * Copyright (C) 2016 Jake Wharton\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/HttpException.java",
"chars": 272,
"preview": "package retrofit2.adapter.rxjava;\n\nimport retrofit2.Response;\n\n/** @deprecated Use {@link retrofit2.HttpException}. */\n@"
},
{
"path": "retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/Result.java",
"chars": 2591,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/ResultOnSubscribe.java",
"chars": 2515,
"preview": "/*\n * Copyright (C) 2016 Jake Wharton\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/RxJavaCallAdapter.java",
"chars": 2390,
"preview": "/*\n * Copyright (C) 2016 Jake Wharton\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/RxJavaCallAdapterFactory.java",
"chars": 5586,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/main/java/retrofit2/adapter/rxjava/package-info.java",
"chars": 74,
"preview": "@retrofit2.internal.EverythingIsNonNull\npackage retrofit2.adapter.rxjava;\n"
},
{
"path": "retrofit-adapters/rxjava/src/main/resources/META-INF/proguard/retrofit2-rxjava-adapter.pro",
"chars": 314,
"preview": "# Keep generic signature of RxJava (R8 full mode strips signatures from non-kept items).\n# It's necessary to add the exp"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/AsyncTest.java",
"chars": 7350,
"preview": "/*\n * Copyright (C) 2017 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/CancelDisposeTest.java",
"chars": 2247,
"preview": "/*\n * Copyright (C) 2018 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/CompletableTest.java",
"chars": 3078,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/CompletableThrowingSafeSubscriberTest.java",
"chars": 4921,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/CompletableThrowingTest.java",
"chars": 4613,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/CompletableWithSchedulerTest.java",
"chars": 1911,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/ForwardingSubscriber.java",
"chars": 1095,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/ObservableTest.java",
"chars": 7576,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/ObservableThrowingSafeSubscriberTest.java",
"chars": 11600,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/ObservableThrowingTest.java",
"chars": 10910,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/ObservableWithSchedulerTest.java",
"chars": 2826,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/RecordingSubscriber.java",
"chars": 4481,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/ResultTest.java",
"chars": 1833,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/RxJavaCallAdapterFactoryTest.java",
"chars": 7172,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/RxJavaPluginsResetRule.java",
"chars": 1281,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/SingleTest.java",
"chars": 7043,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/SingleThrowingTest.java",
"chars": 9828,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/SingleWithSchedulerTest.java",
"chars": 2806,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/StringConverterFactory.java",
"chars": 1366,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/README.md",
"chars": 2150,
"preview": "RxJava2 Adapter\n==============\n\nAn `Adapter` for adapting [RxJava 2.x][1] types.\n\nAvailable types:\n\n * `Observable<T>`, "
},
{
"path": "retrofit-adapters/rxjava2/build.gradle",
"chars": 440,
"preview": "apply plugin: 'java-library'\napply plugin: 'com.vanniktech.maven.publish'\n\ndependencies {\n api projects.retrofit\n api "
},
{
"path": "retrofit-adapters/rxjava2/gradle.properties",
"chars": 127,
"preview": "POM_ARTIFACT_ID=adapter-rxjava2\nPOM_NAME=Adapter: RxJava 2\nPOM_DESCRIPTION=A Retrofit CallAdapter for RxJava 2's stream "
},
{
"path": "retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/BodyObservable.java",
"chars": 2720,
"preview": "/*\n * Copyright (C) 2016 Jake Wharton\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/CallEnqueueObservable.java",
"chars": 3043,
"preview": "/*\n * Copyright (C) 2016 Jake Wharton\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/CallExecuteObservable.java",
"chars": 2520,
"preview": "/*\n * Copyright (C) 2016 Jake Wharton\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/HttpException.java",
"chars": 874,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/Result.java",
"chars": 2390,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/ResultObservable.java",
"chars": 2222,
"preview": "/*\n * Copyright (C) 2016 Jake Wharton\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/RxJava2CallAdapter.java",
"chars": 3008,
"preview": "/*\n * Copyright (C) 2016 Jake Wharton\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/RxJava2CallAdapterFactory.java",
"chars": 5889,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/main/java/retrofit2/adapter/rxjava2/package-info.java",
"chars": 75,
"preview": "@retrofit2.internal.EverythingIsNonNull\npackage retrofit2.adapter.rxjava2;\n"
},
{
"path": "retrofit-adapters/rxjava2/src/main/resources/META-INF/proguard/retrofit2-rxjava2-adapter.pro",
"chars": 316,
"preview": "# Keep generic signature of RxJava2 (R8 full mode strips signatures from non-kept items).\n# It's necessary to add the ex"
},
{
"path": "retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/AsyncTest.java",
"chars": 6745,
"preview": "/*\n * Copyright (C) 2017 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/CancelDisposeTest.java",
"chars": 2497,
"preview": "/*\n * Copyright (C) 2018 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/CancelDisposeTestSync.java",
"chars": 1738,
"preview": "/*\n * Copyright (C) 2018 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/CompletableTest.java",
"chars": 2957,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/CompletableThrowingTest.java",
"chars": 4577,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/CompletableWithSchedulerTest.java",
"chars": 1928,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/FlowableTest.java",
"chars": 5443,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/FlowableThrowingTest.java",
"chars": 11028,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/FlowableWithSchedulerTest.java",
"chars": 2757,
"preview": "/*\n * Copyright (C) 2016 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/MaybeTest.java",
"chars": 5228,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
},
{
"path": "retrofit-adapters/rxjava2/src/test/java/retrofit2/adapter/rxjava2/MaybeThrowingTest.java",
"chars": 9479,
"preview": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
}
]
// ... and 873 more files (download for full content)
About this extraction
This page contains the full source code of the square/retrofit GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1073 files (6.0 MB), approximately 1.6M tokens, and a symbol index with 3796 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.