Created
April 14, 2017 21:22
-
-
Save vheaffinitech/c672d6940567cfdee69670a4b4ebcc85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val route = | |
path("req") { | |
get { | |
parameter("name") { name => | |
requestActor ! Req(name) | |
complete(s"Request sent for $name ! ") | |
} | |
} | |
} ~ | |
path("reqresp") { | |
get { | |
parameter("name") { name => | |
val future = requestResponseActor ? Req(name) | |
val s = Await.result(future, timeout.duration).asInstanceOf[String] | |
complete(s"Actor response is : $s") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment