|
TreeFrogFramework 2.10
|
#include <thttpresponse.h>
Public Member Functions | |
| THttpResponse () | |
| THttpResponse (const THttpResponseHeader &header, const QByteArray &body) | |
| ~THttpResponse () | |
| THttpResponseHeader & | header () |
| const THttpResponseHeader & | header () const |
| bool | isBodyNull () const |
| void | setBody (const QByteArray &body) |
| QByteArray | body () const |
| void | setBodyFile (const QString &filePath) |
| QIODevice * | bodyIODevice () |
| int64_t | bodyLength () const |
| void | clear () |
The THttpResponse class contains response information for HTTP.
|
inline |
Constructor.
| THttpResponse::THttpResponse | ( | const THttpResponseHeader & | header, |
| const QByteArray & | body | ||
| ) |
Constructor with the header header and the body body.
| THttpResponse::~THttpResponse | ( | ) |
Destructor.
| QByteArray THttpResponse::body | ( | ) | const |
Returns the body.
|
inline |
Returns the IO device of the body currently set.
|
inline |
Returns the number of bytes of the body.
| void THttpResponse::clear | ( | ) |
|
inline |
Return the HTTP header.
|
inline |
Return the HTTP header.
| bool THttpResponse::isBodyNull | ( | ) | const |
Returns true if the body is null; otherwise returns false.
| void THttpResponse::setBody | ( | const QByteArray & | body | ) |
Sets the body to body.
| void THttpResponse::setBodyFile | ( | const QString & | filePath | ) |
Sets the file to read the content from the given filePath.