-
Notifications
You must be signed in to change notification settings - Fork 65
Route Creation
Bryce Anderson edited this page Nov 30, 2015
·
13 revisions
The RhoService
is the primary method for creating routes. Route creation is performed in the constructor using combinators defined in the rho package object.
The rho DSL defines helpers for creating path, query, and header rules which will match and/or extract data from the Request
.
Path rules are concerned with defining the path portion of the route. Rules can be simple matching rules:
/// src_inlined SimplePath core/src/test/scala/org/http4s/rhotest/ApiExamples.scala
/// end_src_inlined
or they can capture data from a path segment:
/// src_inlined PathCapture core/src/test/scala/org/http4s/rhotest/ApiExamples.scala
/// end_src_inlined