FastCgiQt::Request Class Reference
[Core]

Class containing information about a request. More...


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.


Detailed Description

Class containing information about a request.

Constructor & Destructor Documentation

FastCgiQt::Request::Request ( quint16  requestId  ) 

Construct a valid Request object, for the specified request id.

Parameters:
requestId is a FastCGI request ID.


Member Function Documentation

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

See also:
Responder::in for a stream.

contentType()

contentLength()

haveAllContent()

waitForAllContent()

postData(const QString&) const

postData() const

quint64 FastCgiQt::Request::contentLength (  )  const

QString FastCgiQt::Request::contentType (  )  const

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.

Parameters:
name is the name of the value to retrieve.
See also:
getData() const

bool FastCgiQt::Request::haveAllContent (  )  const

Whether all the POST data has been uploaded by the client.

See also:
contentType()

contentLength()

content()

waitForAllContent()

postData(const QString&) const

postData() const

bool FastCgiQt::Request::isValid (  )  const

If this Request object is actually valid.

An invalid Request object is not actually associated with a client request.

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.

See also:
contentType()

contentLength()

content()

haveAllContent()

waitForAllContent()

postData(const QString&) const

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.

Parameters:
name is the name of the value to try and retrieve.
See also:
contentType()

contentLength()

content()

haveAllContent()

waitForAllContent()

postData() const

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.

See also:
serverData(const QString&) const

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.

Parameters:
name is the name of the server variable to be retrieved.
See also:
serverData() const

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.

See also:
contentType()

contentLength()

content()

haveAllContent()

postData(const QString&) const

postData() const


The documentation for this class was generated from the following files:

Generated on Sat Aug 22 19:44:56 2009 for FastCGI-Qt by  doxygen 1.5.7