|  Developer
Updated on November 18, 2021

http_server.create_link_url()

  • Creates new plugin’s HTTP link object, which can be accessed via HTTP URLs.
Edit

options: table

Table Field Type Required Description
link_id string Identifier of a new link. If it’s not defined then a new id will be generated.
handler string + Path to a plugin’s Lua script file which should be executed when any new data will come ( in HUB:my_plugin/http_receive.lua format )
user_data any Any data which will be passed to receive_script, send_script and any event. 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 keeping the connection open. Default value: 30000 milliseconds. Max possible value: 3600000 milliseconds.
answer boolean Need to wait for an answer from the plugin or the connection can be closed. Default value: false.
Edit

table, link information

Table Field Type Required Description
link_id string + Identifier of a link created.
url string + Full HTTP link for using this link( Like http://192.168.0.125:17001/v1/links/plugins/
secure_url string + Full HTTPS link for using this link( Like https://192.168.0.125:17000/v1/links/plugins/
Edit
  • Required parameter didn’t define:
  • The file doesn’t exist:
  • Plugin doesn’t have permissions to the file:
  • Wrong format of parameter:
  • Limit of parameter is reached:
  • Limit of connections is reached