http.http.table_to_form_urlencoded
Declaration
lua
http.table_to_form_urlencoded(table)
Description
Convert table to form-urlencoded string. Array values encoded as bracket notation.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
table | table | Required | — | Key-value pairs |
Return Values
| Type | Description |
|---|---|
| string | Encoded string like 'key1=val1&key2=val2' |
Example
lua
local s = http.table_to_form_urlencoded({name="John", age=30})