We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc14aa3 commit 26dfdc5Copy full SHA for 26dfdc5
src/main/kotlin/service/BGGService.kt
@@ -8,7 +8,9 @@ import io.ktor.client.engine.cio.*
8
import io.ktor.client.plugins.contentnegotiation.*
9
import io.ktor.client.request.*
10
import io.ktor.client.statement.*
11
+import io.ktor.http.*
12
import io.ktor.server.config.*
13
+import java.net.URLEncoder
14
15
class BGGService(private val config: ApplicationConfig) {
16
private val client = HttpClient(CIO) {
@@ -22,8 +24,7 @@ class BGGService(private val config: ApplicationConfig) {
22
24
val url = buildString {
23
25
append(baseUrl)
26
append("search?")
- append("query=$query")
- append("&type=boardgame")
27
+ append("query=${URLEncoder.encode(query, "UTF-8")}")
28
append("&exact=${exact ?: 0}")
29
}
30
0 commit comments