module Runcobo::Router
Defined in:
runcobo/actions/router.crInstance Method Summary
-
#delete(url : String) : Nil
Adds DELETE URL to route table.
-
#get(url : String) : Nil
Adds GET URL to route table.
-
#head(url : String) : Nil
Adds HEAD URL to route table.
-
#options(url : String) : Nil
Adds OPTIONS URL to route table.
-
#patch(url : String) : Nil
Adds PATCH URL to route table.
-
#post(url : String) : Nil
Adds POST URL to route table.
-
#put(url : String) : Nil
Adds PUT URL to route table.
-
#route(method : String, url : String)
Binds a route to current klass with method and url.
Instance Method Detail
Adds GET URL to route table. You can bind more than one route to one class.
Binds a route to current klass with method and url.
Uses .get
,.post
, .delete
, .put
, .patch
, .options
, .head
instead.
Uses this method only when you want to add custom method, like "LINK", "UNLINK", "FIND", "PURGE" and etc.
class AddRouteExample < BaseAction
route "LINK", "/example"
call do
render_plain "Hello World!"
end
end