Axmol Engine 2.4.0-258ceca
|
defines the object which users will receive at onHttpCompleted(sender, HttpResponse) callback. 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. | |
virtual | ~HttpResponse () |
Destructor, it will be called in HttpClient internal. | |
ax::Object * | autorelease () |
Override autorelease method to prevent developers from calling it. | |
HttpRequest * | getHttpRequest () const |
Get the corresponding HttpRequest object which leads to this response. | |
yasio::sbyte_buffer * | getResponseData () |
Get the http response data. | |
int | getResponseCode () const |
Get the http response code to judge whether response is successful or not. | |
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. |
|
inlinevirtual |
Destructor, it will be called in HttpClient internal.
Users don't need to destruct HttpResponse object manually.
|
inline |
Override autorelease method to prevent developers from calling it.
If this method is called , it would trigger AXASSERT.
|
inline |
Get the corresponding HttpRequest object which leads to this response.
There's no paired setter for it, because it's already set in class constructor
|
inline |
Get the http response data.
|
inline |
Get the http response code to judge whether response is successful or not.
I know that you want to see the _responseCode is 200. If _responseCode is not 200, you should check the meaning for _responseCode by the net.