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>
Public Member Functions | |
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... | |
Object * | autorelease (void) |
Override autorelease method to prevent developers from calling it. More... | |
local | 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... | |
var | 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... | |
local | 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... | |
local | setSucceed ( local 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... | |
var | setResponseData ( var data) |
Set the http response raw buffer, is used by HttpClient. More... | |
local | setResponseData ( local 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... | |
var | setResponseHeader ( var data) |
Set the http response Header raw buffer, is used by HttpClient. More... | |
local | setResponseHeader ( local 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) |
Protected Member Functions | |
bool | initWithRequest (HttpRequest *request) |
Protected Attributes | |
HttpRequest * | _pHttpRequest |
bool | _succeed |
the corresponding HttpRequest pointer who leads to this response More... | |
std::vector< char > | _responseData |
to indecate if the http reqeust is successful simply More... | |
var | _responseData |
to indecate if the http reqeust is successful simply More... | |
local | _responseData |
to indecate if the http reqeust is successful simply More... | |
std::vector< char > | _responseHeader |
the returned raw data. You can also dump it as a string More... | |
var | _responseHeader |
the returned raw data. You can also dump it as a string More... | |
local | _responseHeader |
the returned raw data. You can also dump it as a string More... | |
int | _responseCode |
the returned raw header data. You can also dump it as a string More... | |
std::string | _errorBuffer |
the status code returned from libcurl, e.g. 200, 404 More... | |
var | _errorBuffer |
the status code returned from libcurl, e.g. 200, 404 More... | |
local | _errorBuffer |
the status code returned from libcurl, e.g. 200, 404 More... | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
unsigned int | _ID |
object id, ScriptSupport need public _ID More... | |
int | _luaID |
Lua reference id. More... | |
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
|
inline |
Constructor, it's used by HttpClient internal, users don't need to create HttpResponse manually.
request | the corresponding HttpRequest which leads to this response |
|
inline |
Constructor, it's used by HttpClient internal, users don't need to create HttpResponse manually.
request | the corresponding HttpRequest which leads to this response |
|
inline |
Constructor, it's used by HttpClient internal, users don't need to create HttpResponse manually.
request | the corresponding HttpRequest which leads to this response |
|
inlinevirtual |
Destructor, it will be called in HttpClient internal, users don't need to desturct HttpResponse object manully.
|
inlinevirtual |
Destructor, it will be called in HttpClient internal, users don't need to desturct HttpResponse object manully.
|
inlinevirtual |
Destructor, it will be called in HttpClient internal, users don't need to desturct HttpResponse object manully.
|
inline |
Override autorelease method to prevent developers from calling it.
|
inline |
Override autorelease method to prevent developers from calling it.
|
inline |
Override autorelease method to prevent developers from calling it.
|
inline |
Get the rror buffer which will tell you more about the reason why http request failed.
|
inline |
Get the rror buffer which will tell you more about the reason why http request failed.
|
inline |
Get the rror buffer which will tell you more about the reason why http request failed.
|
inline |
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.
|
inline |
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.
|
inline |
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.
|
inline |
Get the http response errorCode I know that you want to see http 200 :)
|
inline |
Get the http response errorCode I know that you want to see http 200 :)
|
inline |
Get the http response errorCode I know that you want to see http 200 :)
|
inline |
Get the http response raw data.
|
inline |
Get the http response raw data.
|
inline |
Get the http response raw data.
|
inline |
get the Rawheader
|
inline |
get the Rawheader
|
inline |
get the Rawheader
|
protected |
|
protected |
|
protected |
|
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.
|
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.
|
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.
|
inline |
Set the error buffer which will tell you more the reason why http request failed.
|
inline |
Set the error buffer which will tell you more the reason why http request failed.
|
inline |
Set the error buffer which will tell you more the reason why http request failed.
|
inline |
Set the http response errorCode.
|
inline |
Set the http response errorCode.
|
inline |
Set the http response errorCode.
|
inline |
Set the http response raw buffer, is used by HttpClient.
|
inline |
Set the http response raw buffer, is used by HttpClient.
|
inline |
Set the http response raw buffer, is used by HttpClient.
|
inline |
Set the http response Header raw buffer, is used by HttpClient.
|
inline |
Set the http response Header raw buffer, is used by HttpClient.
|
inline |
Set the http response Header raw buffer, is used by HttpClient.
|
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.
|
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.
|
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.
|
protected |
the status code returned from libcurl, e.g. 200, 404
|
protected |
the status code returned from libcurl, e.g. 200, 404
|
protected |
the status code returned from libcurl, e.g. 200, 404
|
protected |
|
protected |
the returned raw header data. You can also dump it as a string
|
protected |
the returned raw header data. You can also dump it as a string
|
protected |
the returned raw header data. You can also dump it as a string
|
protected |
to indecate if the http reqeust is successful simply
|
protected |
to indecate if the http reqeust is successful simply
|
protected |
to indecate if the http reqeust is successful simply
|
protected |
the returned raw data. You can also dump it as a string
|
protected |
the returned raw data. You can also dump it as a string
|
protected |
the returned raw data. You can also dump it as a string
|
protected |
the corresponding HttpRequest pointer who leads to this response
|
protected |
the corresponding HttpRequest pointer who leads to this response
|
protected |
the corresponding HttpRequest pointer who leads to this response