Created
December 25, 2013 01:46
-
-
Save jamesyoung/8119487 to your computer and use it in GitHub Desktop.
UpdateGameInfo.as::sendRequest()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override public function sendRequest():void | |
{ | |
var m_SendObj:Object = new Object; | |
m_SendObj.cApi = API_NAME; | |
m_SendObj.cMethodName = "POST"; | |
var param : Map = getParms(); | |
LoggerWrapper.instance.getGameInfo(param); | |
param.add("appID", SlotsConfigData.getInstance().getAppPackageName()); | |
param.add("user_id", CSlotController.getInstance().globalData.user.id); | |
param.add("device_id", DeviceUtilHelper.getInstance().getDeviceId()); | |
m_SendObj.cParams = param; | |
m_SendObj.caller = this; | |
var variables:URLVariables = new URLVariables(CHTTPComms.encodeUrl(param, "test")); | |
_req.url = "http://localhost:5000/update_user_state"; | |
_req.method = URLRequestMethod.POST; | |
_req.data = variables; | |
_loader.addEventListener(flash.events.Event.COMPLETE, onUpdateGameInfo); | |
try | |
{ | |
_loader.load(_req); | |
} | |
catch (e:*) | |
{ | |
trace("Unable to load URL"); | |
} | |
//ConnectionManager.getInstance().SendMessage(m_SendObj); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment