korlibs / korlibs/korlibs-io

Quotes should not be implicitly escaped when request body is being stringified

Open
#16 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Kotlin
Stars
2
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Example:

```
suspend fun putData(): Any {
val response = restClient.put(
"users/bob/name.json",
"""
{ "first": "Jack", "last": "Sparrow" }
""".trimIndent()
)
return response
}
```

Example test:

```
@Test
fun putData() = runBlockingNoJs {
val datastore = DatastoreKorge()

val data = datastore.putData()

println(data)
}
```

This makes it unusable for firebase database:

image

Contributor guide

No contributing guide indexed for this repository

Research direction

Start from the Kotlin restClient.put call and trace how its request body is stringified before being sent. Reproduce the example with the JSON body shown; done means quotation marks are not implicitly escaped and the resulting request is usable with Firebase.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.