We are sending a https POST request using the call:
local request = {
url = address
type = “POST”,
verbose = true,
content_type = “application/json”,
data = data_json,
content_length = data_length,
fail_on_error = true,
handler = “HUB:the_plugin/scripts/utils/http_receive”
}
success, result = pcall(http.request, request)
The issue is we need to find out if the request was a success or not. The http_receive handler is being called, but with just an empty table as the parameter. I tried adding a http_connection_closed.lua handler, but it doesn’t appear to be called. I tried to subscribe to the http events via http.subscribe(), but that doesn’t appear to be a valid function.
Has anyone figured out how to do this?
To clarify, this is from a plugin running on the Ezlo sending https requests to an external server.