io.ktor.http.BadContentTypeFormatException: Bad Content-Type format: content-type: application/json
For some reason calling
response.contentType()
causes this exception
If i change marked line to println( response.headers.get("content-type") )
ill get "application/json" as expected4 Replies
⌛
This post has been reserved for your question.
Hey @Tusya <3! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
idk ktor but it seems like this is the issue: https://github.com/ktorio/ktor/issues/1127
GitHub
Content-Type in a request headers · Issue #1127 · ktorio/ktor
Ktor Version 1.1.4 Ktor Engine Used(client or server and name) Apache JVM Version, Operating System and Relevant Context 1.8, macOS Mojave and Linux Mint, IDEA 2019.1.2 CE Feedback I'm accessin...
Stack Overflow
Ktor fails to parse json for api response because of "text/html" co...
I use Ktor (2.3.4) to send an api request to a server that returns json data. Unfortunately, the server put content-type "text/html" instead of "application/json" at headers which
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.