Created
August 11, 2014 10:41
-
-
Save mattroberts297/752b5f0dbf25b17cb718 to your computer and use it in GitHub Desktop.
Spray Routing Pitfall
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
def route = path("foo") { | |
get { | |
complete { | |
println("In foo") // Run on request, not run at start up :-). | |
BodylessHttpResponse(OK) | |
} | |
} | |
} ~ path("bar") { | |
get { | |
println("In bar") // Run at start up, not run on request :-(. | |
complete(BodylessHttpResponse(OK)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment