Singleton that handles asynchrounous http requests Once the request completed, a callback will issued in main thread when it provided during make request.
More...
#include <HttpClient.h>
Singleton that handles asynchrounous http requests Once the request completed, a callback will issued in main thread when it provided during make request.
static void destroyInstance |
( |
) | |
|
|
static |
Relase the shared instance.
Relase the shared instance.
local destroyInstance |
( |
) | |
|
|
static |
Relase the shared instance.
void enableCookies |
( |
const char * |
cookieFile) | |
|
var enableCookies |
( |
var |
cookieFile) | |
|
local enableCookies |
( |
local |
cookieFile) | |
|
Return the shared instance.
Return the shared instance.
Return the shared instance.
int getTimeoutForConnect |
( |
) | |
|
|
inline |
Get connect timeout.
- Returns
- int
var getTimeoutForConnect |
( |
) | |
|
|
inline |
Get connect timeout.
- Returns
- int
local getTimeoutForConnect |
( |
) | |
|
|
inline |
Get connect timeout.
- Returns
- int
int getTimeoutForRead |
( |
) | |
|
|
inline |
Get download timeout.
- Returns
- int
var getTimeoutForRead |
( |
) | |
|
|
inline |
Get download timeout.
- Returns
- int
local getTimeoutForRead |
( |
) | |
|
|
inline |
Get download timeout.
- Returns
- int
Add a get request to task queue.
- Parameters
-
request | a HttpRequest object, which includes url, response callback etc. please make sure request->_requestData is clear before calling "send" here. |
Add a get request to task queue.
- Parameters
-
request | a HttpRequest object, which includes url, response callback etc. please make sure request->_requestData is clear before calling "send" here. |
local send |
( |
local |
request) | |
|
Add a get request to task queue.
- Parameters
-
request | a HttpRequest object, which includes url, response callback etc. please make sure request->_requestData is clear before calling "send" here. |
void setTimeoutForConnect |
( |
int |
value) | |
|
|
inline |
Change the connect timeout.
- Parameters
-
value | The desired timeout. |
var setTimeoutForConnect |
( |
var |
value) | |
|
|
inline |
Change the connect timeout.
- Parameters
-
value | The desired timeout. |
local setTimeoutForConnect |
( |
local |
value) | |
|
|
inline |
Change the connect timeout.
- Parameters
-
value | The desired timeout. |
void setTimeoutForRead |
( |
int |
value) | |
|
|
inline |
Change the download timeout.
- Parameters
-
var setTimeoutForRead |
( |
var |
value) | |
|
|
inline |
Change the download timeout.
- Parameters
-
local setTimeoutForRead |
( |
local |
value) | |
|
|
inline |
Change the download timeout.
- Parameters
-
The documentation for this class was generated from the following file:
- /Users/cocos2d/MyWork/cocos2d-x-develop/cocos/network/HttpClient.h