Hi,
I'm using luacom plugin for HTTP requests to a server (I need to personalize the headers).
I get an error when I'm trying to send my request and the server is not available at that moment
I don't know how to treat this plugin error.
My function:
Error is attached as image
Line 72 is:
I would need some suggestion on how to get rid of this error
Thank you in advance.
I'm using luacom plugin for HTTP requests to a server (I need to personalize the headers).
I get an error when I'm trying to send my request and the server is not available at that moment
I don't know how to treat this plugin error.
My function:
Code:
function HttpRequest(protocol, route, headers, data) [...] local httpReq = luacom.CreateObject("WinHttp.WinHttpRequest.5.1"); httpReq:Open(protocol, URL .. route, false); [ ... set headers ... ] local jdata = JSON.Encode(data); httpReq:Send(jdata); if (httpReq.Status == 200) then local result = httpReq.ResponseText; return result; end [...] end
Line 72 is:
Code:
httpReq:Send(jdata);
Thank you in advance.
Comment