diff --git a/sandbox/build.gradle.kts b/sandbox/build.gradle.kts index 2e8cb331c..b0edb7a44 100644 --- a/sandbox/build.gradle.kts +++ b/sandbox/build.gradle.kts @@ -83,8 +83,7 @@ kotlin { dependencies { implementation(libs.ktor.client.core.jvm) - implementation(libs.kotlinx.coroutines.rx3) - implementation("io.reactivex.rxjava3:rxjava:3.1.9") + implementation("ch.qos.logback:logback-classic:1.2.3") implementation(libs.ktor.client.logging) implementation(libs.ktor.serialization.gson) implementation(libs.ktor.client.cio.jvm) diff --git a/sandbox/src/commonMain/kotlin/com/example/model/MyOwnResponseConverter.kt b/sandbox/src/commonMain/kotlin/com/example/model/MyOwnResponseConverterFactory.kt similarity index 100% rename from sandbox/src/commonMain/kotlin/com/example/model/MyOwnResponseConverter.kt rename to sandbox/src/commonMain/kotlin/com/example/model/MyOwnResponseConverterFactory.kt diff --git a/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/JvMMain.kt b/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/JvMMain.kt index 65041ab35..9a82704e4 100644 --- a/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/JvMMain.kt +++ b/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/JvMMain.kt @@ -66,11 +66,11 @@ fun main() { when (user) { is MyOwnResponse.Success -> { - println(user.data) + System.out.println(user.data) } is MyOwnResponse.Error<*> -> { - println(user.ex) + System.out.println(user.ex) } } delay(3000) diff --git a/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/QueryTestApi.kt b/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/QueryTestApi.kt index 23a9d2ba5..76aae9eba 100644 --- a/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/QueryTestApi.kt +++ b/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/QueryTestApi.kt @@ -6,7 +6,6 @@ import de.jensklingenberg.ktorfit.http.Path import de.jensklingenberg.ktorfit.http.Query import de.jensklingenberg.ktorfit.http.QueryMap import de.jensklingenberg.ktorfit.http.QueryName -import ktorfit.Test interface QueryTestApi { @GET("people/{id}/") diff --git a/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/TestApi.kt b/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/TestApi.kt index f07147314..b0cbef91f 100644 --- a/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/TestApi.kt +++ b/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/TestApi.kt @@ -2,9 +2,12 @@ package de.jensklingenberg.ktorfit.demo import com.example.model.Post import de.jensklingenberg.ktorfit.Call -import de.jensklingenberg.ktorfit.http.* -import io.ktor.client.request.forms.* -import io.reactivex.rxjava3.core.Observable +import de.jensklingenberg.ktorfit.http.Body +import de.jensklingenberg.ktorfit.http.GET +import de.jensklingenberg.ktorfit.http.Headers +import de.jensklingenberg.ktorfit.http.POST +import de.jensklingenberg.ktorfit.http.Path +import io.ktor.client.request.forms.MultiPartFormDataContent import kotlinx.coroutines.flow.Flow interface TestApi { @@ -34,8 +37,4 @@ interface TestApi { suspend fun uppi( @Body map: MultiPartFormDataContent ) - - @Headers(value = ["Accept: application/json"]) - @GET("posts") - fun getObserPosts(): Observable> } diff --git a/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/TestApi2.kt b/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/TestApi2.kt index 8f47e9a09..54091ce50 100644 --- a/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/TestApi2.kt +++ b/sandbox/src/jvmMain/kotlin/de/jensklingenberg/ktorfit/demo/TestApi2.kt @@ -1,4 +1,4 @@ -package ktorfit +package de.jensklingenberg.ktorfit.demo import com.example.api.StarWarsApi import com.example.model.People