Patrick Ramsey
05/01/2021, 12:11 AMval xmlBody: String = [prepare body]
<http://client.post|client.post>([uri]) {
contentType(ContentType.Text.Xml)
body = xmlBody
}
However, I’m getting,
io.ktor.http.UnsafeHeaderException: Header(s) [Content-Type] are controlled by the engine and cannot be set explicitly
What’s the correct way to specify the Content-Type header, if not by explicitly calling contentType()?