Is someone using ktor 1.1.1 on android? If I try t...
# ktor
c
Is someone using ktor 1.1.1 on android? If I try this code
Copy code
GlobalScope.launch {
            try {
                val res = HttpClient().post<String> {
                    url("<http://172.16.94.217:3000/>")
                    body = "HELLO WORLD!"
                }
                Log.e("RES", res)
            } catch (e: Exception){
                e.printStackTrace()
            }
        }
I get a 400 bad request, while removing the body I get a response. The problem is not server side, since the server is not even receiving a call if I add the body Am I the only one getting this behaviour? Hadn't tried with older version atm
m
Looks like the request lacks part name (
"photo"
) and encType.
c
yes, but right now I'm just trying to POST any request. It's not related to the previous issue