Permalink
Browse files

handleWith responds with marshalling

  • Loading branch information...
janm committed Oct 25, 2012
1 parent 022790a commit 75c5f8907a728d0969ab71f7977863c8431b6ef2
Showing with 2 additions and 1 deletion.
  1. +2 −1 sbt/src/main/scala/org/cakesolutions/akkapatterns/api/home.scala
@@ -8,6 +8,7 @@ import spray.routing.Directives
import org.cakesolutions.akkapatterns.core.application.{ PoisonPill, GetImplementation, Implementation }
import java.util.Date
import scala.concurrent.ExecutionContext.Implicits._
+import spray.routing.directives.{MarshallingDirectives, CompletionMagnet}
case class SystemInfo(implementation: Implementation, host: String, timestamp: Long)
@@ -18,7 +19,7 @@ class HomeService(implicit val actorSystem: ActorSystem) extends Directives with
val route = {
path(Slash) {
get {
- complete {
+ handleWith { x: Any =>
(applicationActor ? GetImplementation()).mapTo[Implementation].map {
SystemInfo(_, InetAddress.getLocalHost.getCanonicalHostName, new Date().getTime)
}

0 comments on commit 75c5f89

Please sign in to comment.