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>
|
| CCHttpResponse (CCHttpRequest *request) |
| @ More...
|
|
virtual | ~CCHttpResponse () |
| Destructor, it will be called in CCHttpClient internal, users don't need to desturct HttpResponse object manully. More...
|
|
CCObject * | autorelease (void) |
| Override autorelease method to prevent developers from calling it. More...
|
|
CCHttpRequest * | 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...
|
|
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 CCHttpClient, users mustn't set it directly. More...
|
|
void | setResponseData (std::vector< char > *data) |
| Set the http response raw buffer, is used by CCHttpClient. More...
|
|
void | setResponseHeader (std::vector< char > *data) |
| Set the http response Header raw buffer, is used by CCHttpClient. 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...
|
|
| CCObject (void) |
virtual | ~CCObject (void) |
void | release (void) |
void | retain (void) |
CCObject * | autorelease (void) |
CCObject * | copy (void) |
bool | isSingleReference (void) const |
unsigned int | retainCount (void) const |
virtual bool | isEqual (const CCObject *pObject) |
virtual void | acceptVisitor (CCDataVisitor &visitor) |
virtual void | update (float dt) |
virtual CCObject * | copyWithZone (CCZone *pZone) |
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
Destructor, it will be called in CCHttpClient internal, users don't need to desturct HttpResponse object manully.
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 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 :)
std::vector<char>* getResponseData |
( |
) | |
|
|
inline |
Get the http response raw data.
std::vector<char>
* getResponseHeader |
( |
) | |
|
|
inline |
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.
void setResponseCode |
( |
int |
value) | |
|
|
inline |
Set the http response errorCode.
void setResponseData |
( |
std::vector< char > * |
data) | |
|
|
inline |
void setResponseHeader |
( |
std::vector< char > * |
data) | |
|
|
inline |
Set the http response Header raw buffer, is used by CCHttpClient.
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 CCHttpClient, users mustn't set it directly.
the status code returned from libcurl, e.g. 200, 404
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
std::vector<char> _responseHeader |
|
protected |
the returned raw data. You can also dump it as a string
the corresponding HttpRequest pointer who leads to this response
The documentation for this class was generated from the following file: