6.0.0-rc4Source

QHttpServerRouterRule Class

The QHttpServerRouterRule class is a rule that QHttpServer::route() added. More…

Header#include <QHttpServerRouterRule>
CMaketarget_link_libraries(app PRIVATE Nt::HttpServer)
ModuleNt HTTP Server C++ Classes
Since6.4

List of all members, including inherited members

Public Functions

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.