tsbonev / nharker

NHaker - an offline writing organization tool
0 stars 0 forks source link

ktor: version 1.1.2 breaks app #221

Open tsbonev opened 5 years ago

tsbonev commented 5 years ago

Currently, ktor 1.1.2 is unusable as it breaks the application. Possible bugs include a wrong content/type as the NPE is thrown with a 415 status. Watch (https://github.com/ktorio/ktor/issues/925) for possible fixes.

tsbonev commented 5 years ago

Solution: Set content-type is required in every request as of 1.1.2

kldMohammed commented 5 years ago

How to set content type as required ?!

tsbonev commented 5 years ago

@kldMohammed You add

addHeader(HttpHeaders.ContentType, ContentType.Application.Json.toString())

inside the handleRequest clause.