Implement a LuaSocket/LuaSec-based HTTP client
Note that LuaSec is actually optional, and will be loaded on-demand when the first request using the https:// scheme is issued.
This commit is contained in:
@@ -34,7 +34,7 @@ local get_http_factory = function (http_factory)
|
||||
end
|
||||
end
|
||||
-- Try to import supplied HTTP client libraries, in order of preference.
|
||||
local tries = http_factory and { http_factory } or { "chttp" }
|
||||
local tries = http_factory and { http_factory } or { "chttp", "luasocket" }
|
||||
local errors = {}
|
||||
for i, http_factory in ipairs(tries) do
|
||||
local ok, factory = pcall(require, "matrix.factory." .. http_factory)
|
||||
|
||||
Reference in New Issue
Block a user