The QDjangoHttpResponse class represents an HTTP response.
More...
#include <QDjangoHttpResponse.h>
|
enum | HttpStatus {
OK = 200,
MovedPermanently = 301,
Found = 302,
NotModified = 304,
BadRequest = 400,
AuthorizationRequired = 401,
Forbidden = 403,
NotFound = 404,
MethodNotAllowed = 405,
InternalServerError = 500
} |
| Enum representing well-known HTTP status codes.
|
|
|
class | QDjangoFastCgiConnection |
|
class | QDjangoHttpConnection |
|
The QDjangoHttpResponse class represents an HTTP response.
QDjangoHttpResponse::QDjangoHttpResponse |
( |
| ) |
|
Constructs a new HTTP response.
QDjangoHttpResponse::~QDjangoHttpResponse |
( |
| ) |
|
Destroys the HTTP response.
QByteArray QDjangoHttpResponse::body |
( |
| ) |
const |
Returns the raw body of the HTTP response.
QString QDjangoHttpResponse::header |
( |
const QString & |
key | ) |
const |
Returns the specified HTTP response header.
- Parameters
-
bool QDjangoHttpResponse::isReady |
( |
| ) |
const |
|
virtual |
Returns true if the response is ready to be sent.
The default implementation always returns true. If you subclass QDjangoHttpResponse to support responses which should only be sent to the client at a later point, you need to reimplement this method and emit the ready() signal once the response is ready.
void QDjangoHttpResponse::ready |
( |
| ) |
|
|
signal |
QString QDjangoHttpResponse::reasonPhrase |
( |
| ) |
const |
Returns the reason for the HTTP response status line.
void QDjangoHttpResponse::setBody |
( |
const QByteArray & |
body | ) |
|
Sets the raw body of the HTTP response.
The Content-Length header will be updated to reflect the body size.
- Parameters
-
void QDjangoHttpResponse::setHeader |
( |
const QString & |
key, |
|
|
const QString & |
value |
|
) |
| |
Sets the specified HTTP response header.
- Parameters
-
void QDjangoHttpResponse::setStatusCode |
( |
int |
code | ) |
|
Sets the code for the HTTP response status line.
- Parameters
-
int QDjangoHttpResponse::statusCode |
( |
| ) |
const |
Returns the code for the HTTP response status line.
The documentation for this class was generated from the following files: