https request in lua
I am trying to retrieve a page on my SSL enabled server with a lua script. Important to note that the server has a self-signed certificate. No problem with certificate issued by a trusted CA. local https = require("socket.http") local resp = {} local r, c, h, s = https.request{ url = "https://my-server:443/example.php", sink = ltn12.sink.table(resp), protocol = "tlsv1" } The server returns: Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. And