Take a path with method for handle request, with list of http methods.
Take a path with method for handle request, with list of http methods.
match0[Controller](("show" / IntNumber) ~> "my_method", List(GET, DELETE))
transform to
pathPrefix("show" / IntNumber) { num => get { controller.my_method(num) } ~ delete { controller.my_method(num) } }
- you controller type
path with method for handle request.
- a list with http methods for handle request.
Route
Take a path with method for handle request.
Take a path with method for handle request. By default use spray.http.HttpMethods.GET for http method.
match0[Controller](("show" / IntNumber) ~> "my_show")
transform to
pathPrefix("show" / IntNumber) { num => get { controller.my_show(num) } }
- you controller
Route
Take a method.
Take a method. And provide transformation into route.
match0[Controller]("index", List(GET, DELETE))
Will be transform:
pathPrefix("index") {
get {
controller.index
} ~
delete {
controller.index
}
}
- use as method from controller and path for request.
- a list with http methods for handle request.
Route
Take a method.
Take a method. And provide tranformation into route. By default use spray.http.HttpMethods.GET for request.
match0[Contoller]("index")
Will be transform:
pathPrefix("index") {
get {
controller.index
}
}
- you controller type
information about method. This method will be use as route path.
Route
A root path
A root path
root[Controller]("root")
transform to
pathPrefix("") { controller.root }
- you controller type
- a controller method.
Route
Method for create
Method for create
scope("scope") { pathPrefix("foo") { get { complete("wow") } }
transform to
pathPrefix("scope") { //you block }
string for path
- block of routes
Route
(httpHelpers: StringAdd).self
(httpHelpers: StringFormat).self
(httpHelpers: ArrowAssoc[HttpHelpers]).x
(Since version 2.10.0) Use leftOfArrow
instead
(httpHelpers: Ensuring[HttpHelpers]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
Contain a route helpers