Go to the documentation of this file.
26 #ifndef ENGINEREQUEST_H
27 #define ENGINEREQUEST_H
30 #include <QHostAddress>
31 #include <QElapsedTimer>
33 #include <Cutelyst/Headers>
46 FinalizedHeaders = 0x01,
53 Q_DECLARE_FLAGS(Status, StatusFlag)
63 virtual void finalizeBody();
71 virtual void finalizeError();
84 virtual void finalizeCookies();
91 virtual bool finalizeHeaders();
96 qint64 write(
const char *data, qint64 len);
100 virtual bool webSocketSendTextMessage(
const QString &message);
102 virtual bool webSocketSendBinaryMessage(
const QByteArray &message);
104 virtual bool webSocketSendPing(
const QByteArray &payload);
106 virtual bool webSocketClose(quint16 code,
const QString &reason);
112 virtual qint64
doWrite(
const char *data, qint64 len) = 0;
124 virtual void processingFinished();
131 virtual bool webSocketHandshakeDo(
const QString &key,
const QString &origin,
const QString &protocol);
140 void setPath(
char *rawPath,
const int len);
142 inline void setPath(
const QString &path) {
144 setPath(rawPath.
data(), rawPath.
size());
173 quint64 startOfRequest = 0;
176 Status status = InitialState;
187 quint16 remotePort = 0;
190 bool isSecure =
false;
198 Q_DECLARE_OPERATORS_FOR_FLAGS(Cutelyst::EngineRequest::Status)
200 #endif // ENGINEREQUEST_H
QByteArray toLatin1() const const
QString method
The method used (GET, POST...)
Headers headers
The request headers.
QString path
Call setPath() instead.
QString protocol
The protocol requested by the user agent 'HTTP1/1'.
virtual bool writeHeaders(quint16 status, const Headers &headers)=0
Reimplement this to write the headers back to the client.
QElapsedTimer elapsed
The elapsed timer since the start of request.
QString serverAddress
The server address which the server is listening to, usually the 'Host' header but if that's not pres...
The Cutelyst namespace holds all public Cutelyst API.
QHostAddress remoteAddress
The remote/client address.
virtual qint64 doWrite(const char *data, qint64 len)=0
Reimplement this to do the RAW writing to the client.
QByteArray query
The query string requested by the user agent 'foo=bar&baz'.
QString remoteUser
The remote user name set by a front web server.