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>
Public Member Functions | |
void | enableCookies (const char *cookieFile) |
Enable cookie support. More... | |
void | send (HttpRequest *request) |
Add a get request to task queue. More... | |
void | setTimeoutForConnect (int value) |
Change the connect timeout. More... | |
int | getTimeoutForConnect () |
Get connect timeout. More... | |
void | setTimeoutForRead (int value) |
Change the download timeout. More... | |
int | getTimeoutForRead () |
Get download timeout. More... | |
Public Member Functions inherited from Object | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
void | release () |
Release the ownership immediately. More... | |
void | retain () |
Retains the ownership. More... | |
Object * | autorelease () |
Release the ownership sometime soon automatically. More... | |
bool | isSingleReference () const |
Returns a boolean value that indicates whether there is only one reference to the object. More... | |
unsigned int | retainCount () const |
Returns the object's current reference count. More... | |
virtual bool | isEqual (const Object *object) |
Returns a boolean value that indicates whether this object and a given object are equal. More... | |
virtual void | acceptVisitor (DataVisitor &visitor) |
virtual void | update (float dt) |
Static Public Member Functions | |
static HttpClient * | getInstance () |
Return the shared instance. More... | |
static void | destroyInstance () |
Relase the shared instance. More... | |
var | destroyInstance () |
Relase the shared instance. More... | |
local | destroyInstance () |
Relase the shared instance. More... | |
Additional Inherited Members | |
Public Attributes inherited from Object | |
unsigned int | _ID |
object id, ScriptSupport need public _ID More... | |
int | _luaID |
Lua reference id. More... | |
Protected Attributes inherited from Object | |
unsigned int | _reference |
count of references More... | |
var | _reference |
count of references More... | |
local | _reference |
count of references More... | |
unsigned int | _autoReleaseCount |
count of autorelease More... | |
var | _autoReleaseCount |
count of autorelease More... | |
local | _autoReleaseCount |
count of autorelease More... | |
Singleton that handles asynchrounous http requests Once the request completed, a callback will issued in main thread when it provided during make request.
|
static |
Relase the shared instance.
|
static |
Relase the shared instance.
|
static |
Relase the shared instance.
void enableCookies | ( | const char * | cookieFile) |
Enable cookie support.
var enableCookies | ( | var | cookieFile) |
Enable cookie support.
local enableCookies | ( | local | cookieFile) |
Enable cookie support.
|
static |
Return the shared instance.
|
static |
Return the shared instance.
|
static |
Return the shared instance.
|
inline |
Get connect timeout.
|
inline |
Get connect timeout.
|
inline |
Get connect timeout.
|
inline |
Get download timeout.
|
inline |
Get download timeout.
|
inline |
Get download timeout.
void send | ( | HttpRequest * | request) |
Add a get request to task queue.
request | a HttpRequest object, which includes url, response callback etc. please make sure request->_requestData is clear before calling "send" here. |
var send | ( | var | request) |
Add a get request to task queue.
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.
request | a HttpRequest object, which includes url, response callback etc. please make sure request->_requestData is clear before calling "send" here. |
|
inline |
Change the connect timeout.
value | The desired timeout. |
|
inline |
Change the connect timeout.
value | The desired timeout. |
|
inline |
Change the connect timeout.
value | The desired timeout. |
|
inline |
Change the download timeout.
value |
|
inline |
Change the download timeout.
value |
|
inline |
Change the download timeout.
value |