Class sh::ui::web::WebServerEngineRequest¶
-
class
sh::ui::web
::
WebServerEngineRequest
¶ A web request in a WebServerEngine.
Override this together with WebServerEngine.
Public Functions
-
WebServerEngineRequest
(QString url, QString clientHost)¶
-
QUrl
url
()¶ Returns the requested url.
Note: The url should be considered as opaque, since the exact structure depends on the engine implementation.
-
QString
clientHost
()¶ Returns the client host address.
-
QString
path
()¶ Returns the path part of the requested url.
Note: The url should be considered as opaque, since the exact structure depends on the engine implementation.
-
QString
data
(QString key)¶ Returns data passed as parameter along with the request by
key
.
-
int
responseCode
()¶ Returns the answered (http) response code.
-
QString
responseMimeType
()¶ Returns the mimetype of the answer content.
-
QByteArray
response
()¶ Returns the answer content.
-
bool
responseSet
()¶ Returns if a response was set.
-
void
setResponse
(QByteArray response, QString mimetype, int responseCode = HTTP_OK)¶ Sets the response.
-
QString
headerData
(QString key) = 0¶ Returns an http header value by key. .
-