Public Member Functions | |
| Request () | |
| Construct an invalid Request object. | |
| Request (quint16 requestId) | |
| Construct a valid Request object, for the specified request id. | |
| bool | isValid () const |
| If this Request object is actually valid. | |
| quint16 | requestId () const |
| The FastCGI request ID. | |
| QString | contentType () const |
| The type of the POST-data (if any). | |
| quint64 | contentLength () const |
| The length of the POST data. | |
| QByteArray | content () const |
| The POST data sent in this request. | |
| bool | haveAllContent () const |
| Whether all the POST data has been uploaded by the client. | |
| void | waitForAllContent () const |
| Block until all POST data has been uploaded by the client. | |
| QString | postData (const QString &name) const |
| Retrieve a POST form value. | |
| QHash< QString, QString > | postData () const |
| Retrieve all POST form data. | |
| QString | serverData (const QString &name) const |
| Retrieve a specific server variable. | |
| QHash< QString, QString > | serverData () const |
| Retrieve all server variables. | |
| QString | getData (const QString &name) const |
| Retrieve a GET form value. | |
| QHash< QString, QString > | getData () const |
| Retrieve all GET form values. | |
| QString | baseUri () const |
| Return a guess at the base URI for this script. | |
| QString | fullUri () const |
| Full path, including query string. | |
| QUrl | url () const |
| Full URL. | |
| FastCgiQt::Request::Request | ( | quint16 | requestId | ) |
Construct a valid Request object, for the specified request id.
| requestId | is a FastCGI request ID. |
| QString FastCgiQt::Request::baseUri | ( | ) | const |
Return a guess at the base URI for this script.
This is useful for creating relative links.
| QByteArray FastCgiQt::Request::content | ( | ) | const |
The POST data sent in this request.
If it has not all been received, this method will block until the upload has been finished
| quint64 FastCgiQt::Request::contentLength | ( | ) | const |
The length of the POST data.
| QString FastCgiQt::Request::contentType | ( | ) | const |
The type of the POST-data (if any).
| QHash< QString, QString > FastCgiQt::Request::getData | ( | ) | const |
Retrieve all GET form values.
This returns all name-value form data pairs from the query string.
This is roughly equivalent to $_GET in PHP.
| QString FastCgiQt::Request::getData | ( | const QString & | name | ) | const |
Retrieve a GET form value.
This returns a value which is form-encoded in the query string.
This is roughly equivalent to $_GET[$name] in PHP.
| name | is the name of the value to retrieve. |
| bool FastCgiQt::Request::haveAllContent | ( | ) | const |
Whether all the POST data has been uploaded by the client.
| bool FastCgiQt::Request::isValid | ( | ) | const |
| QHash< QString, QString > FastCgiQt::Request::postData | ( | ) | const |
Retrieve all POST form data.
This will return an empty QHash if the content-type is not application/x-www-urlencoded, or if there were no properly-encoded name-value pairs.
If the content-type is application/x-www-urlencoded, but there is still POST data which hasn't been received yet, this member will block until it has all been received.
This is roughly equivalent to $_POST in PHP.
| QString FastCgiQt::Request::postData | ( | const QString & | name | ) | const |
Retrieve a POST form value.
If the content-type is not application/x-www-urlencoded, or the specified form value wasn't sent, this will return a null QString.
If the content-type is application/x-www-urlencoded, but there is still POST data which hasn't been received yet, this member will block until it has all been received.
This is roughly equivalent to $_POST[$name] in PHP.
| name | is the name of the value to try and retrieve. |
| QHash< QString, QString > FastCgiQt::Request::serverData | ( | ) | const |
Retrieve all server variables.
These variables are equivalent to the environment variables used by CGI, such as the HTTP headers, QUERY_STRING, and so on.
This is roughly equivalent to $_SERVER in PHP.
| QString FastCgiQt::Request::serverData | ( | const QString & | name | ) | const |
Retrieve a specific server variable.
If the specified server variable is not set, this will return a null QString.
This is roughly equivalent to $_SERVER[$name] in PHP.
| name | is the name of the server variable to be retrieved. |
| QUrl FastCgiQt::Request::url | ( | ) | const |
Full URL.
HTTPS, alternative ports
| void FastCgiQt::Request::waitForAllContent | ( | ) | const |
Block until all POST data has been uploaded by the client.
1.5.7