Trying to do an http request on button click

Hey community,

i´m trying to do a http get request on button click, but the callback functions OnHttpRequestSuccess and OnHttpRequestFailure are never executed. what am I doing wrong?

    	local MainMenu = { }
function MainMenu:OnActivate()
self.tickBusHandler = TickBus.Connect(self);
LyShineLua.ShowMouseCursor(true) self.notificationHandler = nil
end
function MainMenu:OnTick(deltaTime, timePoint)
self.tickBusHandler:Disconnect()
Debug.Log("Tick");
self.canvasEntityId = UiElementBus.Event.GetCanvas(self.entityId)
self.canvasNotificationHandler = UiCanvasNotificationBus.Connect(self, self.canvasEntityId) end
function MainMenu:OnAction(entityId, actionName)
Debug.Log(tostring(entityId) .. ": " .. actionName)
if actionName == "http" then self.notificationHandler = HttpClientComponentNotificationBus.Connect(self, self.entityId);
local url = "https://httpbin.org/ip" local http_method = "GET"
local json_body = "{}"
HttpClientComponentRequestBus.Event.MakeHttpRequest(self.entityId, url, http_method, json_body);
Debug.Log("http done")
end
end
function MainMenu:OnHttpRequestSuccess(responseCode, responseBody)
Debug.Log("response code: " .. tostring(responseCode));
Debug.Log("responseBody: " .. tostring(responseBody));
end
function MainMenu:OnHttpRequestFailure(errorCode)
Debug.Log("error code: " .. tostring(errorCode))
end
function MainMenu:OnDeactivate()
if (self.notificationHandler ~= nil) then
self.notificationHandler:Disconnect()
end
self.tickBusHandler:Disconnect()
end
return MainMenu