Signature |
hs.httpserver.hsminweb.cgilua.urlcode.parsequery(query, table) -> none |
Type |
Function |
Description |
Parse the query string and store the key-value pairs in the provided table. |
Parameters |
- query - a URL encoded query string, either from a URL or from the body of a POST request encoded in the "x-www-form-urlencoded" format.
- table - the table to add the key-value pairs to
|
Returns |
|
Notes |
- The specification allows for the same key to be assigned multiple values in an encoded string, but does not specify the behavior; by convention, web servers assign these multiple values to the same key in an array (table). This function follows that convention. This is most commonly used by forms which allow selecting multiple options via check boxes or in a selection list.
- This function uses cgilua.urlcode.insertfield to build the key-value table.
|
Source |
extensions/httpserver/cgilua_compatibility_functions.lua |