<pre class="prettyprint lang-lua">
<pre class="prettyprint lang-lua">
- r:parseargs() -- returns a lua table containing the request's query string arguments
- </pre>
+r:parseargs() -- returns two tables; one standard key/value table for regular GET data,
+ -- and one for multi-value data (fx. foo=1&foo=2&foo=3):
- <pre class="prettyprint lang-lua">
-r:parsebody([sizeLimit]) -- parse the request body as a POST and return a lua table.
+local GET, GETMULTI = r:parseargs()
+r:puts("Your name is: " .. GET['name'] or "Unknown")
+</pre>
+
+
+<pre class="prettyprint lang-lua">
+r:parsebody([sizeLimit]) -- parse the request body as a POST and return two lua tables,
+ -- just like r:parseargs().
-- An optional number may be passed to specify the maximum number
-- An optional number may be passed to specify the maximum number
- -- of bytes to parse. Default is 8192 bytes.
- </pre>
+ -- of bytes to parse. Default is 8192 bytes:
+
+local POST, POSTMULTI = r:parsebody(1024*1024)
+r:puts("Your name is: " .. POST['name'] or "Unknown")
+</pre>
<pre class="prettyprint lang-lua">
r:puts("hello", " world", "!") -- print to response body
<pre class="prettyprint lang-lua">
r:puts("hello", " world", "!") -- print to response body
<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision : 1442083 -->
+<!-- English Revision: 1442083:1477001 (outdated) -->
<!-- French translation : Lucien GENTIS -->
<!-- Reviewed by : Vincent Deffontaines -->
<!-- French translation : Lucien GENTIS -->
<!-- Reviewed by : Vincent Deffontaines -->
<variants>
<variant>en</variant>
<variants>
<variant>en</variant>
+ <variant outdated="yes">fr</variant>