Using Ktor http client to make a request to my Nodejs backend. Tried sending a request manually and it is working, tried with my app, the body is missing. So it has to be something with my setup
Copy code
val data = JSONObject()
data.put("email", "email")
data.put("name", "testname")
data.put("companyName", "testcompname")
return singleFromCoroutine {
try {
val response: HttpResponse =
<http://client.post|client.post>("${serverUrl}${apiEndpoint}/account") {
body = data.toString()
contentType(ContentType.Application.Json)
}
Not sure what is happening, I'll post the entire request that gets received by the server