12 #ifndef ENGINEREQUEST_H 13 #define ENGINEREQUEST_H 15 #include <Cutelyst/Headers> 17 #include <QElapsedTimer> 18 #include <QHostAddress> 33 FinalizedHeaders = 0x01,
40 Q_DECLARE_FLAGS(Status, StatusFlag)
50 virtual void finalizeBody();
58 virtual void finalizeError();
71 virtual void finalizeCookies();
78 virtual bool finalizeHeaders();
83 qint64 write(
const char *data, qint64 len);
87 virtual bool webSocketSendTextMessage(
const QString &message);
89 virtual bool webSocketSendBinaryMessage(
const QByteArray &message);
91 virtual bool webSocketSendPing(
const QByteArray &payload);
93 virtual bool webSocketClose(quint16 code,
const QString &reason);
99 virtual qint64 doWrite(
const char *data, qint64 len) = 0;
111 virtual void processingFinished();
116 virtual bool writeHeaders(quint16 status,
const Headers &headers) = 0;
128 void setPath(
char *rawPath,
const int len);
130 inline void setPath(
const QString &path)
133 setPath(rawPath.
data(), rawPath.
size());
163 quint64 startOfRequest = 0;
166 Status status = InitialState;
177 quint16 remotePort = 0;
180 bool isSecure =
false;
188 Q_DECLARE_OPERATORS_FOR_FLAGS(Cutelyst::EngineRequest::Status)
190 #endif // ENGINEREQUEST_H
QString path
Call setPath() instead.
QString protocol
The protocol requested by the user agent 'HTTP1/1'.
QElapsedTimer elapsed
The elapsed timer since the start of request.
QString remoteUser
The remote user name set by a front web server.
Headers headers
The request headers.
QHostAddress remoteAddress
The remote/client address.
The Cutelyst namespace holds all public Cutelyst API.
QString method
The method used (GET, POST...)
QByteArray toLatin1() const const
QString serverAddress
The server address which the server is listening to, usually the 'Host' header but if that's not pres...
QByteArray query
The query string requested by the user agent 'foo=bar&baz'.
qsizetype size() const const