aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual/cowboy_req.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2024-01-08 15:13:18 +0100
committerLoïc Hoguin <[email protected]>2024-01-08 15:13:18 +0100
commite4a78aaeb110a3eda5269b618230b8bcb18fbcc2 (patch)
tree9c85e90adbe50b118ba0846473b17929bbda5e7d /doc/src/manual/cowboy_req.asciidoc
parentc1490d7d5503636e7995583222cf8edf5f882db5 (diff)
downloadcowboy-e4a78aaeb110a3eda5269b618230b8bcb18fbcc2.tar.gz
cowboy-e4a78aaeb110a3eda5269b618230b8bcb18fbcc2.tar.bz2
cowboy-e4a78aaeb110a3eda5269b618230b8bcb18fbcc2.zip
Document body reading in auto mode
It is now tested both via cowboy_req:read_body and via cowboy_req:cast. Removes a bad example from the guide of body reading with period of infinity, which does not work.
Diffstat (limited to 'doc/src/manual/cowboy_req.asciidoc')
-rw-r--r--doc/src/manual/cowboy_req.asciidoc8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/src/manual/cowboy_req.asciidoc b/doc/src/manual/cowboy_req.asciidoc
index 0a1ca1b..0367836 100644
--- a/doc/src/manual/cowboy_req.asciidoc
+++ b/doc/src/manual/cowboy_req.asciidoc
@@ -120,8 +120,8 @@ request's URI.
[source,erlang]
----
read_body_opts() :: #{
- length => non_neg_integer(),
- period => non_neg_integer(),
+ length => non_neg_integer() | auto,
+ period => non_neg_integer() | infinity,
timeout => timeout()
}
----
@@ -130,6 +130,10 @@ Body reading options.
The defaults are function-specific.
+Auto mode can be enabled by setting `length` to `auto`
+and `period` to `infinity`. The period cannot be set
+to `infinity` when auto mode isn't used.
+
=== req()
[source,erlang]