Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ktor: version 1.1.2 breaks app #221

Open
tsbonev opened this issue Feb 11, 2019 · 3 comments
Open

ktor: version 1.1.2 breaks app #221

tsbonev opened this issue Feb 11, 2019 · 3 comments
Labels
bug Something isn't working framework Make a technology decision

Comments

@tsbonev
Copy link
Owner

tsbonev commented Feb 11, 2019

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 (ktorio/ktor#925) for possible fixes.

@tsbonev tsbonev added bug Something isn't working framework Make a technology decision labels Feb 11, 2019
@tsbonev
Copy link
Owner Author

tsbonev commented Feb 14, 2019

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

@kldMohammed
Copy link

How to set content type as required ?!

@tsbonev
Copy link
Owner Author

tsbonev commented Feb 18, 2019

@kldMohammed
You add

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

inside the handleRequest clause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working framework Make a technology decision
Projects
None yet
Development

No branches or pull requests

2 participants