23 #ifndef TUFAO_HTTPSERVERRESPONSE_H
24 #define TUFAO_HTTPSERVERRESPONSE_H
26 #include <QtCore/QObject>
27 #include "tufao_global.h"
51 SWITCHING_PROTOCOLS = 101,
58 NON_AUTHORITATIVE_INFORMATION = 203,
61 PARTIAL_CONTENT = 206,
63 ALREADY_REPORTED = 208,
66 MULTIPLE_CHOICES = 300,
67 MOVED_PERMANENTLY = 301,
73 TEMPORARY_REDIRECT = 307,
74 RESUME_INCOMPLETE = 308,
78 PAYMENT_REQUIRED = 402,
81 METHOD_NOT_ALLOWED = 405,
83 PROXY_AUTHENTICATION_REQUIRED = 407,
84 REQUEST_TIMEOUT = 408,
87 LENGTH_REQUIRED = 411,
88 PRECONDITION_FAILED = 412,
89 REQUEST_ENTITY_TOO_LARGE = 413,
90 REQUEST_URI_TOO_LONG = 414,
91 UNSUPPORTED_MEDIA_TYPE = 415,
92 REQUESTED_RANGE_NOT_SATISFIABLE = 416,
93 EXPECTATION_FAILED = 417,
95 UNPROCESSABLE_ENTITY = 422,
97 FAILED_DEPENDENCY = 424,
98 UNORDERED_COLLECTION = 425,
99 UPGRADE_REQUIRED = 426,
100 PRECONDITION_REQUIRED = 428,
101 TOO_MANY_REQUESTS = 429,
102 REQUEST_HEADER_FIELDS_TOO_LARGE = 431,
105 CLIENT_CLOSED_REQUEST = 499,
107 INTERNAL_SERVER_ERROR = 500,
108 NOT_IMPLEMENTED = 501,
110 SERVICE_UNAVAILABLE = 503,
111 GATEWAY_TIMEOUT = 504,
112 HTTP_VERSION_NOT_SUPPORTED = 505,
113 VARIANT_ALSO_NEGOTIATES = 506,
114 INSUFFICIENT_STORAGE = 507,
116 BANDWIDTH_LIMIT_EXCEEDED = 509,
167 Q_DECLARE_FLAGS(Options, Option)
187 Options options = Options(),
188 QObject *parent = 0);
198 Options options() const;
215 bool setOptions(Options options);
223 const
Headers &headers() const;
279 bool writeContinue();
291 bool writeHead(
int statusCode, const QByteArray &reasonPhrase,
300 bool writeHead(
int statusCode, const QByteArray &reasonPhrase);
309 const QByteArray &reasonPhrase, const
Headers &headers);
318 const QByteArray &reasonPhrase);
361 bool write(const QByteArray &chunk);
388 bool addTrailers(const
Headers &headers);
415 bool addTrailer(const QByteArray &headerName,
416 const QByteArray &headerValue);
427 bool end(const QByteArray &chunk = QByteArray());
445 const QByteArray &chunk)
447 response.
write(chunk);
453 #endif // TUFAO_HTTPSERVERRESPONSE_H
The Tufao::HttpServerResponse is used to respond to a Tufao::HttpServerRequest.
Definition: httpserverresponse.h:142
Option
This enum represents some aspects of a HTTP response.
Definition: httpserverresponse.h:149
HttpResponseStatus
The values in this enum represents a HTTP status code.
Definition: httpserverresponse.h:47
This is the namespace where all Tufão facilities are grouped.
Definition: abstracthttpserverrequesthandler.h:30
bool write(const QByteArray &chunk)
This sends a chunk of the response body.