Class CCHttpClient

#include <Geode/cocos/extensions/network/HttpClient.h>
classCCHttpClient:publiccocos2d::CCObject{ ... }

Singleton that handles asynchrounous http requests Once the request completed, a callback will issued in main thread when it provided during make request

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

Parameters

request

a CCHttpRequest object, which includes url, response callback etc. please make sure request->_requestData is clear before calling "send" here.
Return value
NULL
voidsetTimeoutForConnect(
intvalue
)

Change the connect timeout

Parameters

timeout

Return value
NULL
intgetTimeoutForConnect()

Get connect timeout

Return value
int
voidsetTimeoutForRead(
intvalue
)

Change the download timeout

Parameters

value

Return value
NULL
intgetTimeoutForRead()

Get download timeout

Return value
int
Fields2
int_timeoutForConnect
;
No description provided
int_timeoutForRead
;
No description provided
Protected member functions0
Protected fields0