Issues with RPCs in Lua

It appears that my RPCs aren’t sending data to the server no sure why please help. :joy:

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 = ""
}

it also appears that nakama.rpc_func errors with needing a string but cannot seem to accept any string i put into it

function M.custom_rpc_test()
	local payload = {
		item = "cowboy"
	}

	-- Encode the payload to JSON
	local body = json.encode(payload)
	pprint(body)
	

	-- Call the nakama rpc function with the encoded JSON body
	nakama.rpc_func(M.client, "custom_rpc_func_id", body, nil, function(message)
		if message then
			pprint(message)
		else
			pprint("Error: No message received from nakama.rpc_func")
		end
	end)
end

error code

DEBUG:SCRIPT: {"item":"cowboy"}
DEBUG:SCRIPT: nakama/nakama.lua:2511: Argument 'body' must be of type 'string'
DEBUG:SCRIPT: 

Solved the issue I wasn’t using the most up to date version of nakama looks like this solves the issue.