It appears that my RPCs aren’t sending data to the server no sure why please help.
function M.custom_rpc_test()
local payload = {
item = "cowboy"
}
local body = json.encode(payload)
pprint("Encoded JSON Body: " .. body)
-- Call the nakama rpc function with the encoded JSON body
nakama.rpc_func2(M.client, "custom_rpc_func_id", body, nil, function(result)
pprint(result)
end)
end
debug log
DEBUG:SCRIPT: Encoded JSON Body: {"item":"cowboy"}
DEBUG:SCRIPT: /v2/rpc/custom_rpc_func_id with callback
DEBUG:SCRIPT: HTTP GET http://127.0.0.1:7350/v2/rpc/custom_rpc_func_id?payload=%7B%22item%22%3A%22cowboy%22%7D
DEBUG:SCRIPT: DATA nil
DEBUG:SCRIPT: {"payload":""}
DEBUG:SCRIPT:
{ --[[0000020E7E0031A0]]
payload = ""
}