QHttpServerRouterRule Class
The QHttpServerRouterRule class is a rule that QHttpServer::route() added. More…
| Header | #include <QHttpServerRouterRule> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::HttpServer) |
| Module | Nt HTTP Server C++ Classes |
| Since | 6.4 |
List of all members, including inherited members
Public Functions
| ~QHttpServerRouterRule() | |
| const QObject * | contextObject() const |
| QString | pathPattern() const |
| QHttpServerRequest::Methods | methods() const |
Detailed Description
A rule is owned by its QHttpServer, and lives as long as the server.
See also QHttpServer::route().
Differences from Qt
Rules cannot be created or subclassed by the application, so there are no exec(), matches() or hasValidMethods() functions.
Member Function Documentation
QHttpServerRouterRule::~QHttpServerRouterRule()
Destroys the rule.
const QObject * QHttpServerRouterRule::contextObject() const
Returns the context object of the rule, or nullptr if the rule has none or the object was destroyed.
QHttpServerRequest::Methods QHttpServerRouterRule::methods() const
Returns the methods the rule accepts.
QString QHttpServerRouterRule::pathPattern() const
Returns the path pattern of the rule, with <arg> for each path argument.