anybody have a way to work around the above ^. I'...
# ktor
anybody have a way to work around the above ^. I'm a bit confused about the error
ktor Content-Type need to be passed in OutgoingContent.contentType
. Anybody have links to OutgoingContent documentation and how I can configure it at instantiation?
there's also a contentType method on HttpMessageBuilder. Would that work for you?
Copy code
client.get<HttpResponse>() {
it's just weird because GET doesn't have a body...
referencing it in the messagebuilder has always given me the initial runtime error of
io.ktor.http.UnsafeHeaderException: Header Content-Type is controlled by the engine and cannot be set explicitly
probably because you're trying to set it on a GET request. Are you sure you're not confusing Content-Type with Accept?
probably. i have an api i'm interacting with that I initially set headers for all requests :X
thanks ­čÖé
I spun around in circles on that recently for a while before I realized I was trying to add it to all requests and I didn't need it on my GET.