aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-09-23 21:36:52 +0300
committerLoïc Hoguin <[email protected]>2014-09-23 21:36:52 +0300
commit25259671f51c076720b64959a700263eaa0937b2 (patch)
tree07ae7032a4855b1db5cae151cffa7cdd5bb6e8cf /doc/src/manual
parentf1c3b6d76f0c97e1ab927c288bb94891ae4c253b (diff)
downloadcowboy-25259671f51c076720b64959a700263eaa0937b2.tar.gz
cowboy-25259671f51c076720b64959a700263eaa0937b2.tar.bz2
cowboy-25259671f51c076720b64959a700263eaa0937b2.zip
Make routing constraints use the fields format
This makes routing more in line with the rest of Cowboy and allows us to use cowboy_constraints directly.
Diffstat (limited to 'doc/src/manual')
-rw-r--r--doc/src/manual/cowboy_router.ezdoc19
1 files changed, 2 insertions, 17 deletions
diff --git a/doc/src/manual/cowboy_router.ezdoc b/doc/src/manual/cowboy_router.ezdoc
index f76acf6..8d45e67 100644
--- a/doc/src/manual/cowboy_router.ezdoc
+++ b/doc/src/manual/cowboy_router.ezdoc
@@ -22,31 +22,16 @@ Environment output:
List of bindings found during routing.
-: constraints() = [IntConstraint | FunConstraint]
-
-Types:
-
-* IntConstraint = {atom(), int}
-* FunConstraint = {atom(), function, Fun}
-* Fun = fun((binary()) -> true | {true, any()} | false)
-
-List of constraints to apply to the bindings.
-
-The int constraint will convert the binding to an integer.
-The fun constraint allows writing custom code for checking
-the bindings. Returning a new value from that fun allows
-replacing the current binding with a new value.
-
: dispatch_rules() - opaque to the user
Rules for dispatching request used by Cowboy.
-: routes() = [{Host, Paths} | {Host, constraints(), Paths}]
+: routes() = [{Host, Paths} | {Host, cowboy:fields(), Paths}]
Types:
* Host = Path = '_' | iodata()
-* Paths = [{Path, Handler, Opts} | {Path, constraints(), Handler, Opts}]
+* Paths = [{Path, Handler, Opts} | {Path, cowboy:fields(), Handler, Opts}]
* Handler = module()
* Opts = any()