for some of my request sometimes I receive a fatal...
# ktor
s
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
@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
im sending a POST request via Postman to refresh a token. The body is empty. Only auth header
t
It sounds like you need to set the content type in your request.
s
@tKw tried but error still appears
t
Could you post your handling code and the request (without any secrets of course)?