Hi,
I've been trying to find an example that illustrates how to write a route
that follows different paths based on the Content-Type of a request.
Clearly, I can extract the value of the "Content-Type" header, but then
there is the charset and everything to worry about in the resulting value.
Basically I want to have a post { ... } rule, that do three different
things if the incoming data is text/plain (split it by newlines),
application/json (parse it as such). In both cases I would want to
unmarshall the data in the charset given by the client. A third rule would
match the binary type application/x-vnd-foo would parse the incoming data
from ByteString.
So how do I use all the akka niceties to write this "case statement" with 3
different part-routes without having to extract and match the strings?
The world seems to be full of examples of how to match 'Accept' rules to
response content types in akka, but nothing easy to find on the incoming
case.
Thanks,
Kresten
--
>>>>>>>>>> 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.