本文整理汇总了C++中CCHTTPRequest::start方法的典型用法代码示例。如果您正苦于以下问题:C++ CCHTTPRequest::start方法的具体用法?C++ CCHTTPRequest::start怎么用?C++ CCHTTPRequest::start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCHTTPRequest
的用法示例。
在下文中一共展示了CCHTTPRequest::start方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
static int tolua_cocos2dx_httprequest_luabinding_CCHTTPRequest_start00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CCHTTPRequest",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CCHTTPRequest* self = (CCHTTPRequest*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'start'", NULL);
#endif
{
bool tolua_ret = (bool) self->start();
tolua_pushboolean(tolua_S,(bool)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'start'.",&tolua_err);
return 0;
#endif
}
示例2: createHTTPRequestLua
CCHTTPRequest* CCNetwork::createHTTPRequestLua(LUA_FUNCTION listener,
const char* url,
int method)
{
CCHTTPRequest* request = CCHTTPRequest::createWithUrlLua(listener, url, method);
request->start();
return request;
}
示例3: requestLastestVersion
void AssetsUpdateLayer::requestLastestVersion()
{
char reqStr[128];
sprintf(reqStr, "%s%s", SERVER_ADDRESS, ASSETS_VERSION_FILE);
CCHTTPRequest* req = CCHTTPRequest::createWithUrl(this, /*HTTPRequest_selector(AssetsUpdateLayer::requestLastestVersionCallback), */
reqStr);
req->start();
}
示例4: createHTTPRequest
NS_CC_EXTRA_BEGIN
CCHTTPRequest* CCNetwork::createHTTPRequest(CCHTTPRequestDelegate* delegate,
const char* url,
int method)
{
CCHTTPRequest* request = CCHTTPRequest::createWithUrl(delegate, url, method);
request->start();
return request;
}
示例5: createHTTPRequest
NS_CC_EXTRA_BEGIN
#if (CC_CURL_ENABLED > 0 || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
CCHTTPRequest* CCNetwork::createHTTPRequest(CCHTTPRequestDelegate* delegate,
const char* url,
int method)
{
CCHTTPRequest* request = CCHTTPRequest::createWithUrl(delegate, url, method);
request->start();
return request;
}