HTTP
Last updated
Last updated
string
, url: string
, data [?]
: {headers:table<string>, cookies:string|table<string>, data:string|table<string>}
, callback: fun(tbl: {response: string, code: string, header: string, param: string}):nil
, param [?]
: string
): boolean
Name | Type | Description |
---|
Do HTTP request. Returns true
if request was sent successfully.
method |
| HTTP method |
url |
| URL |
data |
| data to send |
callback |
| callback function to call when request is done. Take 1 argument - response data table, see example. |
param |
| string parameter to pass to callback function to identify request |