TreeFrogFramework 2.10
Loading...
Searching...
No Matches
Public Member Functions | List of all members
THttpResponse Class Reference

#include <thttpresponse.h>

Public Member Functions

 THttpResponse ()
 
 THttpResponse (const THttpResponseHeader &header, const QByteArray &body)
 
 ~THttpResponse ()
 
THttpResponseHeaderheader ()
 
const THttpResponseHeaderheader () 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 ()
 

Detailed Description

The THttpResponse class contains response information for HTTP.

Constructor & Destructor Documentation

◆ THttpResponse() [1/2]

THttpResponse::THttpResponse ( )
inline

Constructor.

◆ THttpResponse() [2/2]

THttpResponse::THttpResponse ( const THttpResponseHeader header,
const QByteArray &  body 
)

Constructor with the header header and the body body.

◆ ~THttpResponse()

THttpResponse::~THttpResponse ( )

Destructor.

Member Function Documentation

◆ body()

QByteArray THttpResponse::body ( ) const

Returns the body.

◆ bodyIODevice()

QIODevice * THttpResponse::bodyIODevice ( )
inline

Returns the IO device of the body currently set.

◆ bodyLength()

int64_t THttpResponse::bodyLength ( ) const
inline

Returns the number of bytes of the body.

◆ clear()

void THttpResponse::clear ( )

◆ header() [1/2]

THttpResponseHeader & THttpResponse::header ( )
inline

Return the HTTP header.

◆ header() [2/2]

const THttpResponseHeader & THttpResponse::header ( ) const
inline

Return the HTTP header.

◆ isBodyNull()

bool THttpResponse::isBodyNull ( ) const

Returns true if the body is null; otherwise returns false.

◆ setBody()

void THttpResponse::setBody ( const QByteArray &  body)

Sets the body to body.

◆ setBodyFile()

void THttpResponse::setBodyFile ( const QString &  filePath)

Sets the file to read the content from the given filePath.


The documentation for this class was generated from the following files: