coletz
10/22/2018, 3:54 PMheaders[HttpHeaders.ContentType] = ContentType.Application.Json.toString()
and contentType(ContentType.Application.Json)
but I get an exception: io.ktor.http.UnsafeHeaderException: Header Content-Type is controlled by the engine and cannot be set explicitly
. How to set it with the engine? Considering I'm using ios so I'm not sure I can use ktor-client-jsonDeactivated User
10/22/2018, 4:26 PMDeactivated User
10/22/2018, 4:27 PMbody = TextContent("json", ContentType.Application.Json)
Deactivated User
10/22/2018, 4:27 PMDeactivated User
10/22/2018, 4:51 PMDeactivated User
10/22/2018, 5:00 PMcoletz
10/22/2018, 5:11 PMketilsan
12/03/2018, 7:55 AMapplication/xacml+json
spand
12/03/2018, 7:57 AMContentType
is a class here. Cant you just call the constructor with what you want it to be ?lukaswelte
12/03/2018, 7:58 AMJsonFeature
(I wanted to have the result directly parsed as JSON)ketilsan
12/03/2018, 8:00 AMketilsan
12/03/2018, 8:00 AMketilsan
12/03/2018, 8:03 AMContentType.create("myMimeType")
seems promising
edit: nah, was looking at the wrong ContentType-classcmgurba
12/12/2018, 8:19 PMcoletz
12/13/2018, 3:01 PM