path: root/doc/src/manual/cowboy_req.match_qs.asciidoc
diff options
authorLoïc Hoguin <[email protected]>2016-11-07 18:03:47 +0200
committerLoïc Hoguin <[email protected]>2016-11-07 18:03:47 +0200
commit7b248e5163fd852d6defe967318da849433dadb1 (patch)
tree2db5fc09210cb77e77cf14a9ac61fef932131f15 /doc/src/manual/cowboy_req.match_qs.asciidoc
parentbd34dfdedd369b42b1e6920f60c32b0594802aa2 (diff)
Add man pages for the parse/match/binding cowboy_req functions
Diffstat (limited to 'doc/src/manual/cowboy_req.match_qs.asciidoc')
1 files changed, 14 insertions, 4 deletions
diff --git a/doc/src/manual/cowboy_req.match_qs.asciidoc b/doc/src/manual/cowboy_req.match_qs.asciidoc
index e66d311..845d09a 100644
--- a/doc/src/manual/cowboy_req.match_qs.asciidoc
+++ b/doc/src/manual/cowboy_req.match_qs.asciidoc
@@ -15,10 +15,20 @@ match_qs(Fields :: cowboy:fields(), Req :: cowboy_req:req())
Parse the query string and match specific values against
-This function allows easily retrieving expected values
-from the query string, validating and converting them
-in one call. In addition, the keys are converted to
-atoms, making manipulation that much simpler.
+Cowboy will only return the query string values specified
+in the fields list, and ignore all others. Fields can be
+either the key requested; the key along with a list of
+constraints; or the key, a list of constraints and a
+default value in case the key is missing.
+This function will crash if the key is missing and no
+default value is provided. This function will also crash
+if a constraint fails.
+The key must be provided as an atom. The key of the
+returned map will be that atom. The value may be converted
+through the use of constraints, making this function able
+to extract, validate and convert values all in one step.
== Arguments