whitecatboard / Lua-RTOS-ESP32

Lua RTOS for ESP32
Other
1.18k stars 221 forks source link

added simple https client / net.http.get #310

Closed the0ne closed 4 years ago

the0ne commented 4 years ago

can connect to https only / easy to use / chunked downloading returns response code + content (content only if response code is 200)

lua example:

local code, content = net.http.get("www.foo.bar", "/foo/index.html",
"text/html")
if code == 200 then
    content = table.concat(content)
end

also fixed memory leaks in net_ota()

updated file formatting in a separate commit