cocos2d XMLHttpRequest post返回空

–回调方法
local function onReadyStateChange()
local jsonData = xhr.response --这里返回为空
print("–login–jsonData–",jsonData,"—",xhr.status)
end
local sendData = “username=”…username…"&password="…password print("–sendData",sendData)-- 注册脚本回调方法 xhr:registerScriptHandler(onReadyStateChange) xhr:send(sendData) – 发送请求

不需要检查xhr.status吗

xhr.readyState = 1 状态不对,是啥原因,但是get又没有问题。

我也遇到了这个问题,请问你有查到为什么post不可以了吗