Advertisement
Guest User

Untitled

a guest
Jul 7th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.60 KB | None | 0 0
  1.   val route =
  2.     get {
  3.       path("rest") {
  4.         path("orders") {
  5.           complete {
  6.             "List of orders"
  7.           }
  8.         } ~
  9.         path("orders" / Segment) { orderId: String ⇒
  10.           complete {
  11.             s"Order with id = $orderId"
  12.           }
  13.         } ~
  14.         path("orders" / Segment / "shipments") { orderId: String ⇒
  15.           complete {
  16.             s"Shipments for id = $orderId"
  17.           }
  18.         }
  19.       }
  20.     } ~
  21.     post {
  22.       path("orders" / Segment / "cancel") { orderId: String ⇒
  23.         complete(s"Cancel order id = $orderId")
  24.       }
  25.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement