On 04/14/2016 08:17 PM, Simon Schäfer wrote:
I need to deliver content with the Content-Type
`application/sparql-results+xml; charset=UTF-8` but akka-http doesn't
have this one predefined in `MediaTypes`. I tried to create my own
`MediaType` but it is not possible since the hierarchy is sealed. I
can't deliver with a different content type, is it possible to somehow
put my own content type in the http header?
I solved the problem by myself with the following code:
val mt = MediaType.applicationWithOpenCharset("sparql-results+xml")
val ct = mt withCharset HttpCharsets.`UTF-8`
I simply oversaw that it is possible to create custom `MediaTypes`.
--
Read the docs: http://akka.io/docs/
Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.