Hi Brian,
everything is now Future-based instead of relying on RequestContext's
side-effects as in spray. Apart from that, not much changed. So, just
use the Akka ask pattern and either A) complete with the future if you
have a Marshaller available or otherwise B) use the `onComplete` or
`onSuccess` directives to continue working with the result of the
Future:
A)
pathPrefix("document" / Segment) {
docId => complete((actor ? Message).mapTo[Result])
}
B)
pathPrefix("document" / Segment) {
docId =>
onSuccess((actor ? Message).mapTo[Result]) { (r: Result) =>
// put another route here
}
}
Both would have worked the same way in spray.
HTH
Johannes
> --
> You received this message because you are subscribed to the Google Groups
> "Akka Developer List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
akka-dev+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
--
Johannes
-----------------------------------------------
Johannes Rudolph
http://virtual-void.net