Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed Aug 12, 2024
1 parent d2e2142 commit 80c69af
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions example/MultiplatformExample/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ val ktorVersion = "3.0.0-beta-2"
val ktorfitVersion = "2.0.1"

kotlin {
wasmJs()
jvmToolchain(8)
targetHierarchy.default()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.exampleimport
import de.jensklingenberg.ktorfit.http.GET
import de.jensklingenberg.ktorfit.http.Path
import kotlinx.coroutines.flow.Flow

interface WasmStarWarsApi {
@GET("people/{id}/")
suspend fun getPersonByIdResponse(
@Path("id") peopleId: Int
): String

@GET("people/{id}/")
fun getPersonByIdFlowResponse(
@Path("id") peopleId: Int
): Flow<String>
}

0 comments on commit 80c69af

Please sign in to comment.