Singleton that handles asynchrounous http requests Once the request completed, a callback will issued in main thread when it provided during make request
Class CCHttpClient
#include <Geode/cocos/extensions/network/HttpClient.h>
classCCHttpClient:publiccocos2d::CCObject{ ... }
Examples0
Public static methods2
staticcocos2d::extension::CCHttpClient*getInstance()
Return the shared instance *
staticvoiddestroyInstance()
Relase the shared instance *
Public member functions5
voidsend()
Add a get request to task queue
request
a CCHttpRequest object, which includes url, response callback etc. please make sure request->_requestData is clear before calling "send" here.
NULL
intgetTimeoutForConnect()
Get connect timeout
int
intgetTimeoutForRead()
Get download timeout
int