Wexus2 0.20
|
#include <HTTP.h>
Public Types | |
typedef QVariantMap | ClientCookies |
Public Member Functions | |
const QString & | request (void) const |
const QString & | query (void) const |
const QString & | referer (void) const |
const QString & | userAgent (void) const |
qint64 | contentLength (void) const |
QIODevice * | input (void) const |
const ClientCookies & | cookies (void) const |
ClientCookies & | cookies (void) |
Protected Member Functions | |
int | parseCookies (const QString &raw_cookie_str) |
Protected Attributes | |
QString | dm_request |
QString | dm_query |
QString | dm_referer |
QString | dm_useragent |
qint64 | dm_contentlength |
QIODevice * | dm_inputdev |
ClientCookies | dm_clientcookies |
All the information in a HTTPRequest. The handler can use this information to compose their HTTPReply.
qint64 wexus::HTTPRequest::contentLength | ( | void | ) | const [inline] |
The value of the content length field. Always will be >=0, even if it wasn't set in the headers.
ClientCookies& wexus::HTTPRequest::cookies | ( | void | ) | [inline] |
Returns the cookies sent by the client. non-const version. Callers can fiddle with the cookie map for convience.
const ClientCookies& wexus::HTTPRequest::cookies | ( | void | ) | const [inline] |
Returns the cookies sent by the client.
QIODevice* wexus::HTTPRequest::input | ( | void | ) | const [inline] |
Returns the input device that contains any data sent after the headers.
Note that some classes will already process this stream (like wexus::FormParams) QIODevice seem to always be passed by ptr.
int wexus::HTTPRequest::parseCookies | ( | const QString & | raw_cookie_str | ) | [protected] |
helper function that decendants can use. parse out the cookies from raw_cookie_str and fill dm_clientcookies with the found cookies never fails (well, never reports failure returns the number of cookies parsed