Type of request. Possible value: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE. Default value: GET.
content_type
string
–
Type of sending content
headers
object / array of objects
–
Custom request headers. See The headers collection. The headers collection should be specified the same way the parent request does it.
keep_alive
bool
–
Keep the HTTP request alive after establishing connection. Each plugin can have not more than 50 “alive” connections. Default value: false.
repeat_allowed
bool
–
Allows sequential repeat_request() call after the request is completed. Otherwise, allows to get multiple responses on a single request. Default value: true.
content_length
int
–
Length of content data in bytes
data
string, binary
–
Data for sending
last
bool
–
Does all data was sent or not? Default value: true. If this field is false then http_data_send event would be generated for sending next part of data for this request.
handler
string
+
Path to script file of plugin which should be executed when any event of connection would be generated( in HUB:my_plugin/http_receive.lua format)
user_data
any
–
User data that was passed to an http.request() call. Can be of any valid type: string, number, boolean, array, object. If is null, the value will not be set..
timeout
int
–
Timeout in milliseconds for waiting response. Default value: 30000 milliseconds. Max possible value: 86400000 milliseconds( 24 hours ).
connect_timeout
int
–
Timeout in milliseconds for establishing connection. Default value: 10000 milliseconds. Max possible value: 600000 milliseconds.