How can I send a plain json string from ktor-clien...
# ktor
b
How can I send a plain json string from ktor-client-js? Currently it's getting escaped... i.e.:
{"key":123}
is sent as
"{"key":123}"
s
Send a string with content type json
b
As in
Copy code
httpClient.put<HttpResponse>(url) {
      body = valueJson
      contentType(ContentType.Application.Json)
    }
? this doesn't work
Nvm, solved it:
Copy code
httpClient.put<HttpResponse>(url) {
      body = TextContent(valueJson,ContentType.Application.Json)
    }
👍 1