0
在我的腳本中,我使用庫LuaSocket發送XML代碼。這與以下代碼正常工作:如何使用LuaSec以HTTPS發送
local request_body = (XMLHeader..XMLBody);
local response_body = {}
local res, code, response_headers = socket.http.request
{
url = "http://blabla.com/v01/Authenticatie.svc";
method = "POST";
headers =
{
["Content-Type"] = "application/soap+xml; charset=utf-8";
["Content-Length"] = string.len(request_body);
["Accept-Encoding"] = "gzip, deflate";
["Connection"] = "Keep-Alive";
};
source = ltn12.source.string(request_body);
sink = ltn12.sink.table(response_body);
}
但現在我會發送帶有證書的protocoll HTTPS的XML。我知道我可以使用LuaSec但是如何?有人可以告訴我,我可以如何修改代碼爲HTTPS的工作代碼?