Hi, have you seen the recent akka-http-microservice
<https://github.com/theiterators/akka-http-microservice> example? It may
not be exactly what you want but does a great job showing how to do
akka-http routing.
On Monday, February 9, 2015 at 7:21:52 PM UTC-8, Alexey Romanchuk wrote:
>
> Hello!
>
> As I understand from docs akka-http seamless integrates with akka-stream
> by passing flow to handleWith method. Also we have well known routing dsl
> from spray with all these nested directives. But I can not figure out how
> to use them together.
>
> I want to have routing dsl together with seamless akka streams
> integration. Something like this:
>
> val flow1 = Flow[(Int, String), X] //X can be marshalled
>
> respondWithHeaders(...) {
> path("...") {
> get {
> parameters("...".as[Int]?) { param =>
> optionalCookie("...") { cookie =>
> (param, cookie) -> flow1
> }
> }
> }
> } ~
> ...
> }
>
> Dsl is very useful to extract parameters and matches and flows is very
> natural way to build responses. This is not concrete API, but an idea how
> it may looks like. Any thoughts?
>
> Thanks!
>
> p.s. If I miss something obvious form docs please point me to it :)
>
--
>>>>>>>>>> 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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.