Body content is empty in http post from lua script

0

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
質問済み 7年前326ビュー
8回答
0

I was looking at the headers sent with the POST and the content-type is also not sent.

回答済み 7年前
0

tks a lot! version 1.8.0.0 here

did you update much thing on lua script support from 1.8 to 1.8+?

回答済み 7年前
0

I've created a request to have a tech take a look and chime in here. Sorry you are having these issues.

回答済み 7年前
0

In 1.0.8.1, nothing in the way of Lua support.

回答済み 7年前
0

@REDACTEDUSER

回答済み 7年前
0

Hello @REDACTEDUSER

Unfortunately, this is a known issue in 1.9 and is being addressed in the next release. Stay tuned!

Thanks!

回答済み 7年前
0

@REDACTEDUSER

回答済み 7年前
0

post paylod populated now! 1.10 fixed this. Tks a lot guys!

回答済み 7年前

この投稿はクローズされています。新しい回答、コメント、投票の追加はできません。

関連するコンテンツ