HTTPS Client Library (Application Server Component)

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:

  • Offers persistent connections and unlimited file sizes for upload and download
  • Supports HTTP authentication, server authentication with Certificate Authorities Validation, and client authentication with client certificate
  • Compliant with HTTP 1.0/1.1, SOCKS5 and HTTPS proxy, and TLS/SSL security
  • Allows use of data streaming and WebSockets
  • Includes easy-to-use command API with a high-level API for common operations
  • Supports HTTP cookies

The Barracuda Application Server includes PikeHTTP
(HTTP and HTTPS client).

PikeHTTP Can Be Purchased in Multiple Configurations:

  • PikeHTTP(S) client C library comes as a pre-integrated component of the Barracuda Application Server
  • PikeHTTP(S) standalone client is typically used in devices that require communication with a central server product or as a base for designing automatic firmware upgrade functionality
  • PikeHTTP(S) standalone client integrated with SharkSSL embedded SSL/TLS
  • PikeHTTP(S) standalone client integrated with SharkSSL and the JSON parser/serializer to easily send control messages over HTTPS.

Barracuda Application Server and 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 following Lua example shows how to send JSON data as part of the HTTP body to a JSON echo service. The service responds with the original data and additional JSON data.

Click the Run button below the source code

<?lsp
response:setcontenttype"text/plain"

local rdata -- rec data
local sdata={ -- data to send
   hello = "world",
   vector = { i=10, j=15 }
}
 
local http = require"httpc".create()
 
local ok,err=http:request{
   url="https://postman-echo.com/post",
   method="POST",
   header={["Content-Type"]="application/json; charset=utf-8"}
}
if ok then
   ok,err=http:write(ba.json.encode(sdata))
   if ok then
      rdata,err=http:read"*a"
   end
end
if rdata then
   print("Rec Data:", rdata)
   print("Valid JSON: ", ba.json.decode(rdata) and "yes" or "no")
else
   print("Err:",err)
end
?>

Next: WebDAV Server