The QDjangoHttpController class provides static methods for replying to HTTP requests.
More...
#include <QDjangoHttpController.h>
The QDjangoHttpController class provides static methods for replying to HTTP requests.
◆ getBasicAuth()
bool QDjangoHttpController::getBasicAuth |
( |
const QDjangoHttpRequest & | request, |
|
|
QString & | username, |
|
|
QString & | password ) |
|
static |
Extract basic credentials from an HTTP request.
Returns true if credentials were provider, false otherwise.
◆ httpDateTime() [1/2]
QString QDjangoHttpController::httpDateTime |
( |
const QDateTime & | dt | ) |
|
|
static |
Converts a QDateTime to an HTTP datetime string.
◆ httpDateTime() [2/2]
QDateTime QDjangoHttpController::httpDateTime |
( |
const QString & | str | ) |
|
|
static |
Converts an HTTP datetime string to a QDateTime.
◆ serveAuthorizationRequired()
Respond to an HTTP request with an authorization error.
- Parameters
-
◆ serveBadRequest()
Respond to a malformed HTTP request.
- Parameters
-
◆ serveInternalServerError()
Respond to an HTTP request with an internal server error.
- Parameters
-
◆ serveNotFound()
Respond to an HTTP request with a not found error.
- Parameters
-
◆ serveRedirect()
Respond to an HTTP request with a redirect.
- Parameters
-
request | |
url | The URL to which the user is redirected. |
permanent | Whether the redirect is permanent. |
◆ serveStatic()
Respond to an HTTP request for a static file.
- Parameters
-
request | |
docPath | The path to the document, such that it can be opened using a QFile. |
expires | An optional expiry date. |
The documentation for this class was generated from the following files: