Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed Aug 26, 2024
1 parent b668d76 commit 8309551
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 13 deletions.
3 changes: 1 addition & 2 deletions sandbox/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -34,8 +37,4 @@ interface TestApi {
suspend fun uppi(
@Body map: MultiPartFormDataContent
)

@Headers(value = ["Accept: application/json"])
@GET("posts")
fun getObserPosts(): Observable<List<Post>>
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ktorfit
package de.jensklingenberg.ktorfit.demo

import com.example.api.StarWarsApi
import com.example.model.People
Expand Down

0 comments on commit 8309551

Please sign in to comment.