All the HTTP GET requests are working great as the tutorial shows.
But POST is not. I have look the c++ code looking for POST support and it seems to have. The body with the json is not been posted. Any ideas? My lua script:
local session = {
Properties = {},
}
function session:OnActivate()
local url = "https://xyz.com/Prod/?id=37467f9e-74a0-4c68-b864-5055deb3d885"
local http_method = "POST"
local json_body = "{\"a\" : \"b\"}"
HttpClientComponentRequestBus.Event.MakeHttpRequest(self.entityId, url, http_method, json_body);
end
function session:OnHttpRequestSuccess(responseCode, responseBody)
Debug.Log("HTTP RESPONSE -- " .. responseCode);
Debug.Log("HTTP BODY -- " .. responseBody);
end
function session:OnHttpRequestFailure(errorCode)
Debug.Log("HTTP Error -- " .. errorCode);
end
function session:OnDeactivate()
self.notificationHandler:Disconnect();
end
return session