Created
February 10, 2014 21:44
-
-
Save natbusa/8924843 to your computer and use it in GitHub Desktop.
routing
This file contains hidden or 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 serviceRoute = { | |
pathPrefix("api" / "v1" / "breakfast") { | |
get { | |
parameters('eggs.as[Int], 'strips.as[Int], 'slices.as[Int], 'juices.as[Int], 'coffee.as[Int]) { | |
(friedeggs, baconstrips, breadslices, orangejuices, coffeemugs) => | |
complete { | |
Breakfast( | |
MainDish( | |
FriedEggs(friedeggs), | |
CrispyBacon(baconstrips)), | |
SideDish( | |
ToastedBread(breadslices)), | |
Drinks( | |
OrangeJuice(orangejuices), | |
HotCoffee(coffeemugs))) | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment