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) -- 发送请求