Complete Suite of Embedded Web Development ToolsStandalone Tools for Embedded Development
IoT Protocols
Quick Look
|
The PikeHTTP client enables embedded devices to communicate with any web server and to upload and download any type of data. Devices can independently retrieve files such as configuration files and software updates, enabling large arrays of devices to be updated simultaneously without direct, one-by-one reconfiguration. FEATURES:
The Barracuda Application Server includes PikeHTTP |
The PikeHTTP C library comes as a pre-integrated component of the Barracuda Application Server and includes Lua bindings (Lua to C connector) making it easy to use the HTTP client library from Lua code. The example to the right shows how to use the Lua API and how one can use the HTTP client library to download new firmware versions from the company main server. The example shows how to use the client from behind a proxy. The company main server requires the client to login. In addition, the firmware is packaged as a ZIP file and password protected. The Barracuda Server's integrated ZIP file system supports AES 256 bits encryption, the new ZIP file encryption standard. |
local http=require"httpm" -- Create a HTTP client obj local httpc=http.create{ -- client behind a proxy proxy="my-local-proxy", proxyuser="myuser", proxypass="mypass" } -- Download firmware local ok,err=httpc:download{ -- Local file system IO io=ba.openio"disk", -- Save data in io, location: name="/tmp/firmware.zip", -- Use sharkSSL for https:// shark=ba.create.sharkssl(nil,ba.create.sharkcert()), -- Secure URL to company main server url="https://company.com/firmware.zip", -- Main server requires the client to authenticate user="company-username", password="company-password" } -- Download OK if ok then -- Create ZIP IO by using the downloaded ZIP file local io=ba.mkio(ba.openio"disk","/tmp/firmware.zip") if io then -- Firmware encoded with 256 bits AES encryption. io:setpasswd"the-firmware-zipfile-pass" -- use IO to extract data, see IO documentation end end |