for some of my request sometimes I receive a fatal error: io.ktor.features.UnsupportedMediaTypeException: Content type / is not supported. I tried to wrap a request receiver method in try-catch block, but it happens somewhere early. Ktor version 1.0.0
t
tKw
12/26/2018, 1:42 AM
@savrov, Are you setting the correct request type on your request? If you have a route handler for json, but are not sending a request with the proper content type, you will get this error (413). We have ran into this when sending requests via curl, but not setting the correct content type.
s
savrov
12/26/2018, 1:37 PM
im sending a POST request via Postman to refresh a token. The body is empty. Only auth header
t
tKw
12/26/2018, 1:54 PM
It sounds like you need to set the content type in your request.
s
savrov
12/26/2018, 4:38 PM
@tKw tried but error still appears
t
tKw
12/26/2018, 4:38 PM
Could you post your handling code and the request (without any secrets of course)?