6.0.0-rc4Source

Nt HTTP Server C++ Classes

Classes for embedding an HTTP server in an application.

Using the Module

target_link_libraries(app PRIVATE Nt::HttpServer)

Nt HTTP Server answers HTTP/1.1 requests from the Nt Core event loop. QHttpServer maps URL paths to handlers, with typed path arguments; QAbstractHttpServer is the base for servers that answer requests another way.

See Using Nt HTTP Server for a walk through, and examples/httpserver/hello_server.cpp for a complete program.

Classes

QAbstractHttpServerThe QAbstractHttpServer class is the base of HTTP servers: it accepts connections and parses requests.
QHttpServerThe QHttpServer class is an HTTP server that answers requests with routes.
QHttpServerRequestThe QHttpServerRequest class holds a request that a QAbstractHttpServer received.
QHttpServerResponderThe QHttpServerResponder class writes the response to one request.
QHttpServerResponseThe QHttpServerResponse class holds a complete response: a status code, header fields and a body.
QHttpServerRouterRuleThe QHttpServerRouterRule class is a rule that QHttpServer::route() added.
QHttpServerWebSocketUpgradeResponseThe QHttpServerWebSocketUpgradeResponse class is the verdict of a verifier on a WebSocket upgrade request.