summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/http_request.lua
diff options
context:
space:
mode:
Diffstat (limited to 'misc/freeswitch/scripts/http_request.lua')
-rw-r--r--misc/freeswitch/scripts/http_request.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/misc/freeswitch/scripts/http_request.lua b/misc/freeswitch/scripts/http_request.lua
index 8acdcb6..1d6f791 100644
--- a/misc/freeswitch/scripts/http_request.lua
+++ b/misc/freeswitch/scripts/http_request.lua
@@ -28,4 +28,9 @@ if user and password then
end
local success, result, response_headers = http.request{url = url, headers = headers };
-log:debug('HTTP_REQUEST - url: ', url, ', auth: ', tostring(headers.Authorization ~= nil), ', result: ', result);
+
+if success then
+ log:debug('HTTP_REQUEST - url: ', url, ', auth: ', tostring(headers.Authorization ~= nil), ', result: ', result);
+else
+ log:notice('HTTP_REQUEST - url: ', url, ', auth: ', tostring(headers.Authorization ~= nil), ', result: ', result);
+end