resty-cli.lua
local http = require 'resty.luasocket.http'
local httpc = http.new()
local res, err = httpc:request_uri('https://www.google.com/', {
ssl_verify = true,
ssl_server_name = 'www.google.com',
})
print("try 1: ",tostring(res), " ", tostring(err))
require('resty.luasocket').force_luasocket("timer", true)
local httpc = http.new()
local res, err = httpc:request_uri('https://www.google.com/', {
ssl_verify = true,
ssl_server_name = 'www.google.com',
})
print("try 2: ",res.status, " ", tostring(err))