defines the object which users will receive at onHttpCompleted(sender, HttpResponse) callback Please refer to samples/TestCpp/Classes/ExtensionTest/NetworkTest/HttpClientTest.cpp as a sample
More...
#include <HttpResponse.h>
|
| HttpResponse (HttpRequest *request) |
| Constructor, it's used by HttpClient internal, users don't need to create HttpResponse manually. More...
|
|
virtual | ~HttpResponse () |
| Destructor, it will be called in HttpClient internal, users don't need to desturct HttpResponse object manully. More...
|
|
cocos2d::Object * | autorelease (void) |
| Override autorelease method to prevent developers from calling it. More...
|
|
var | autorelease () |
| Override autorelease method to prevent developers from calling it. More...
|
|
HttpRequest * | getHttpRequest () |
| Get the corresponding HttpRequest object which leads to this response There's no paired setter for it, coz it's already setted in class constructor. More...
|
|
bool | isSucceed () |
| To see if the http reqeust is returned successfully, Althrough users can judge if (http return code = 200), we want an easier way If this getter returns false, you can call getResponseCode and getErrorBuffer to find more details. More...
|
|
std::vector< char > * | getResponseData () |
| Get the http response raw data. More...
|
|
std::vector< char > * | getResponseHeader () |
| get the Rawheader More...
|
|
int | getResponseCode () |
| Get the http response errorCode I know that you want to see http 200 :) More...
|
|
const char * | getErrorBuffer () |
| Get the rror buffer which will tell you more about the reason why http request failed. More...
|
|
local | getErrorBuffer () |
| Get the rror buffer which will tell you more about the reason why http request failed. More...
|
|
void | setSucceed (bool value) |
| Set if the http request is returned successfully, Althrough users can judge if (http code == 200), we want a easier way This setter is mainly used in HttpClient, users mustn't set it directly. More...
|
|
void | setResponseData (std::vector< char > *data) |
| Set the http response raw buffer, is used by HttpClient. More...
|
|
void | setResponseHeader (std::vector< char > *data) |
| Set the http response Header raw buffer, is used by HttpClient. More...
|
|
void | setResponseCode (int value) |
| Set the http response errorCode. More...
|
|
void | setErrorBuffer (const char *value) |
| Set the error buffer which will tell you more the reason why http request failed. More...
|
|
| 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) |
defines the object which users will receive at onHttpCompleted(sender, HttpResponse) callback Please refer to samples/TestCpp/Classes/ExtensionTest/NetworkTest/HttpClientTest.cpp as a sample
- Since
- v2.0.2
Constructor, it's used by HttpClient internal, users don't need to create HttpResponse manually.
- Parameters
-
request | the corresponding HttpRequest which leads to this response |
Constructor, it's used by HttpClient internal, users don't need to create HttpResponse manually.
- Parameters
-
request | the corresponding HttpRequest which leads to this response |
Constructor, it's used by HttpClient internal, users don't need to create HttpResponse manually.
- Parameters
-
request | the corresponding HttpRequest which leads to this response |
Destructor, it will be called in HttpClient internal, users don't need to desturct HttpResponse object manully.
Destructor, it will be called in HttpClient internal, users don't need to desturct HttpResponse object manully.
Destructor, it will be called in HttpClient internal, users don't need to desturct HttpResponse object manully.
Override autorelease method to prevent developers from calling it.
Override autorelease method to prevent developers from calling it.
Override autorelease method to prevent developers from calling it.
const char* getErrorBuffer |
( |
) | |
|
|
inline |
Get the rror buffer which will tell you more about the reason why http request failed.
Get the rror buffer which will tell you more about the reason why http request failed.
Get the rror buffer which will tell you more about the reason why http request failed.
Get the corresponding HttpRequest object which leads to this response There's no paired setter for it, coz it's already setted in class constructor.
Get the corresponding HttpRequest object which leads to this response There's no paired setter for it, coz it's already setted in class constructor.
Get the corresponding HttpRequest object which leads to this response There's no paired setter for it, coz it's already setted in class constructor.
Get the http response errorCode I know that you want to see http 200 :)
Get the http response errorCode I know that you want to see http 200 :)
local getResponseCode |
( |
) | |
|
|
inline |
Get the http response errorCode I know that you want to see http 200 :)
std::vector<char>* getResponseData |
( |
) | |
|
|
inline |
Get the http response raw data.
Get the http response raw data.
local getResponseData |
( |
) | |
|
|
inline |
Get the http response raw data.
std::vector<char>
* getResponseHeader |
( |
) | |
|
|
inline |
var getResponseHeader |
( |
) | |
|
|
inline |
local getResponseHeader |
( |
) | |
|
|
inline |
var initWithRequest |
( |
var |
request) | |
|
|
protected |
local initWithRequest |
( |
local |
request) | |
|
|
protected |
To see if the http reqeust is returned successfully, Althrough users can judge if (http return code = 200), we want an easier way If this getter returns false, you can call getResponseCode and getErrorBuffer to find more details.
To see if the http reqeust is returned successfully, Althrough users can judge if (http return code = 200), we want an easier way If this getter returns false, you can call getResponseCode and getErrorBuffer to find more details.
To see if the http reqeust is returned successfully, Althrough users can judge if (http return code = 200), we want an easier way If this getter returns false, you can call getResponseCode and getErrorBuffer to find more details.
void setErrorBuffer |
( |
const char * |
value) | |
|
|
inline |
Set the error buffer which will tell you more the reason why http request failed.
var setErrorBuffer |
( |
var |
value) | |
|
|
inline |
Set the error buffer which will tell you more the reason why http request failed.
local setErrorBuffer |
( |
local |
value) | |
|
|
inline |
Set the error buffer which will tell you more the reason why http request failed.
void setResponseCode |
( |
int |
value) | |
|
|
inline |
Set the http response errorCode.
var setResponseCode |
( |
var |
value) | |
|
|
inline |
Set the http response errorCode.
local setResponseCode |
( |
local |
value) | |
|
|
inline |
Set the http response errorCode.
void setResponseData |
( |
std::vector< char > * |
data) | |
|
|
inline |
Set the http response raw buffer, is used by HttpClient.
var setResponseData |
( |
var |
data) | |
|
|
inline |
Set the http response raw buffer, is used by HttpClient.
local setResponseData |
( |
local |
data) | |
|
|
inline |
Set the http response raw buffer, is used by HttpClient.
void setResponseHeader |
( |
std::vector< char > * |
data) | |
|
|
inline |
Set the http response Header raw buffer, is used by HttpClient.
var setResponseHeader |
( |
var |
data) | |
|
|
inline |
Set the http response Header raw buffer, is used by HttpClient.
local setResponseHeader |
( |
local |
data) | |
|
|
inline |
Set the http response Header raw buffer, is used by HttpClient.
void setSucceed |
( |
bool |
value) | |
|
|
inline |
Set if the http request is returned successfully, Althrough users can judge if (http code == 200), we want a easier way This setter is mainly used in HttpClient, users mustn't set it directly.
var setSucceed |
( |
var |
value) | |
|
|
inline |
Set if the http request is returned successfully, Althrough users can judge if (http code == 200), we want a easier way This setter is mainly used in HttpClient, users mustn't set it directly.
local setSucceed |
( |
local |
value) | |
|
|
inline |
Set if the http request is returned successfully, Althrough users can judge if (http code == 200), we want a easier way This setter is mainly used in HttpClient, users mustn't set it directly.
the status code returned from libcurl, e.g. 200, 404
the status code returned from libcurl, e.g. 200, 404
the status code returned from libcurl, e.g. 200, 404
the returned raw header data. You can also dump it as a string
the returned raw header data. You can also dump it as a string
the returned raw header data. You can also dump it as a string
std::vector<char> _responseData |
|
protected |
to indecate if the http reqeust is successful simply
to indecate if the http reqeust is successful simply
to indecate if the http reqeust is successful simply
std::vector<char> _responseHeader |
|
protected |
the returned raw data. You can also dump it as a string
the returned raw data. You can also dump it as a string
the returned raw data. You can also dump it as a string
the corresponding HttpRequest pointer who leads to this response
the corresponding HttpRequest pointer who leads to this response
the corresponding HttpRequest pointer who leads to this response
The documentation for this class was generated from the following file: