diff --git a/routes/index.html b/routes/index.html index 969acc6..d308350 100644 --- a/routes/index.html +++ b/routes/index.html @@ -73,7 +73,7 @@

Constructing A Route

Type Transformations for Handlers

If you dig into the types produced by Requests, you notice a lot of tuple types are used. Here's an example, showing a Request producing a Tuple2.

val request = Request.get(Path.root / Param.int / Param.string)
-// request: Request[*:[Int, *:[String, EmptyTuple]], Unit, Unit, Unit] = krop.route.Request@3e606b49
+// request: Request[*:[Int, *:[String, EmptyTuple]], Unit, Unit, Unit] = krop.route.Request@2cc0f214

However, when you come to use a handler with such a request, you can use a normal function with two arguments not a function that accepts a single Tuple2.

Route(request, Response.ok(Entity.text))
   .handle((int, string) => s"${int.toString}: ${string}")
diff --git a/routes/paths.html b/routes/paths.html index f95b065..548f1c9 100644 --- a/routes/paths.html +++ b/routes/paths.html @@ -71,8 +71,8 @@

Matching All Segments

// // A path is closed when it has a segment or parameter that matches all remaining elements. // A closed path cannot have additional segments of parameters added to it. -// at krop.route.Path.assertOpen(Path.scala:250) -// at krop.route.Path.$div(Path.scala:223) +// at krop.route.Path.assertOpen(Path.scala:247) +// at krop.route.Path.$div(Path.scala:220) // at repl.MdocSession$MdocApp.$init$$$anonfun$1(paths.md:41)

Params