| CMakeLists.txt |
|
2185 |
- |
| qabstracthttpserver.cpp |
!
\internal
|
19733 |
- |
| qabstracthttpserver.h |
|
3516 |
- |
| qabstracthttpserver_p.h |
|
2834 |
- |
| qhttpserver.cpp |
!
\class QHttpServer
\since 6.4
\inmodule QtHttpServer
\brief QHttpServer is a simplified API for QAbstractHttpServer and QHttpServerRouter.
QHttpServer is used to create a simple HTTP server by registering a range
of request handlers.
The \l route function can be used to conveniently add rules to the
server's \l QHttpServerRouter. To register a handler that is called after
every request to further process the response use \l
addAfterRequestHandler, but this mechanism only works for routes returning
\l QHttpServerResponse or QFuture<QHttpServerResponse>. To register a
handler for all unhandled requests use \l setMissingHandler.
Minimal example:
\code
QHttpServer server;
server.route("/", [] () {
return "hello world";
});
auto tcpserver = new QTcpServer();
if (!tcpserver->listen() || !server.bind(tcpserver)) {
delete tcpserver;
return -1;
}
qDebug() << "Listening on port" << tcpserver->serverPort();
\endcode
|
16598 |
- |
| qhttpserver.h |
|
18266 |
- |
| qhttpserver_p.h |
|
1404 |
- |
| qhttpserverconfiguration.cpp |
!
\class QHttpServerConfiguration
\since 6.9
\inmodule QtHttpServer
\brief The QHttpServerConfiguration class controls server parameters.
|
13617 |
- |
| qhttpserverconfiguration.h |
|
3107 |
- |
| qhttpserverhttp1protocolhandler.cpp |
|
25242 |
- |
| qhttpserverhttp1protocolhandler_p.h |
|
3660 |
- |
| qhttpserverhttp2protocolhandler.cpp |
|
16190 |
- |
| qhttpserverhttp2protocolhandler_p.h |
|
3936 |
- |
| qhttpserverliterals.cpp |
|
857 |
- |
| qhttpserverliterals_p.h |
|
774 |
- |
| qhttpserverparser.cpp |
!
\internal
|
26610 |
- |
| qhttpserverparser_p.h |
|
2908 |
- |
| qhttpserverrequest.cpp |
!
\fn QDebug QHttpServerRequest::operator<<(QDebug debug, const QHttpServerRequest &request)
Writes information about \a request to the \a debug stream.
\sa QDebug
|
7998 |
- |
| qhttpserverrequest.h |
|
4022 |
- |
| qhttpserverrequest_p.h |
|
1677 |
- |
| qhttpserverrequestfilter.cpp |
!
\internal
|
4351 |
- |
| qhttpserverrequestfilter_p.h |
|
2140 |
- |
| qhttpserverresponder.cpp |
!
\class QHttpServerResponder
\since 6.4
\inmodule QtHttpServer
\brief API for sending replies from an HTTP server.
Provides functions for writing back to an HTTP client with overloads for
serializing JSON objects. It also has support for writing HTTP headers and
status code.
|
14159 |
- |
| qhttpserverresponder.h |
|
5294 |
- |
| qhttpserverresponder_p.h |
|
1804 |
- |
| qhttpserverresponse.cpp |
!
\class QHttpServerResponse
\since 6.4
\inmodule QtHttpServer
\brief Encapsulates an HTTP response.
API for creating, reading and modifying a response from an HTTP server,
and for writing its contents to a QHttpServerResponder.
It has numerous constructors, and \c static function \c fromFile for
constructing it from the contents of a file. There are functions for
setting, getting, and removing headers, and for getting the data, status
code and mime type.
|
7567 |
- |
| qhttpserverresponse.h |
|
3081 |
- |
| qhttpserverresponse_p.h |
|
1029 |
- |
| qhttpserverrouter.cpp |
!
\internal
|
9384 |
- |
| qhttpserverrouter.h |
|
3093 |
- |
| qhttpserverrouter_p.h |
|
1029 |
- |
| qhttpserverrouterrule.cpp |
|
13252 |
- |
| qhttpserverrouterrule.h |
|
5992 |
- |
| qhttpserverrouterrule_p.h |
|
926 |
- |
| qhttpserverrouterviewtraits.h |
|
5392 |
- |
| qhttpserverstream.cpp |
|
2440 |
- |
| qhttpserverstream_p.h |
|
2521 |
- |
| qhttpserverviewtraits_impl.h |
|
3843 |
- |
| qhttpserverwebsocketupgraderesponse.cpp |
!
\class QHttpServerWebSocketUpgradeResponse
\since 6.8
\inmodule QtHttpServer
\brief Response to return when verifying WebSocket upgrades on HTTP server.
Use this class to return when determining whether a socket upgrade should
succeed. If type() is \l Accept upgrade the socket, if type() is \l Deny
send an error with the given denyStatus() and denyMessage(), and if type()
is \l PassToNext proceed to the next registered handler.
If all handlers return \l PassToNext or none exist,
QAbstractHttpServer::missingHandler() is executed.
\sa QAbstractHttpServer::addWebSocketUpgradeVerifier(),
QAbstractHttpServer::missingHandler()
|
5525 |
- |
| qhttpserverwebsocketupgraderesponse.h |
|
2750 |
- |
| qthttpserverglobal.h |
|
326 |
- |