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

Undertow server implementation does not support BytesContent #78

Closed
plokhotnyuk opened this Issue Feb 2, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@plokhotnyuk
Copy link

plokhotnyuk commented Feb 2, 2019

scala.MatchError: BytesContent([B@78a9621a, contentType: application/json) (of class io.youi.http.content.BytesContent)
	at io.youi.server.UndertowServerImplementation$.handleStandard(UndertowServerImplementation.scala:277)
	at io.youi.server.UndertowServerImplementation$.response(UndertowServerImplementation.scala:190)
	at io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$2(UndertowServerImplementation.scala:116)
	at io.youi.server.UndertowServerImplementation.$anonfun$requestHandler$2$adapted(UndertowServerImplementation.scala:115)

Code to reproduce

@darkfrog26 darkfrog26 closed this in 43916a7 Feb 2, 2019

@darkfrog26

This comment has been minimized.

Copy link
Collaborator

darkfrog26 commented Feb 2, 2019

This is resolved in 0.10.2 that is being published right now.

@darkfrog26

This comment has been minimized.

Copy link
Collaborator

darkfrog26 commented Feb 2, 2019

FYI, you can also just do:

path"/json" / Content.json(JsonUtil.toJson(Message("Hello, World!")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment