Eneboo - Documentación para desarrolladores
|
The QHttpRequestHeader class contains request header information for HTTP.network. Más...
#include <qhttp.h>
Métodos públicos | |
QHttpRequestHeader () | |
QHttpRequestHeader (const QString &method, const QString &path, int majorVer=1, int minorVer=1) | |
QHttpRequestHeader (const QHttpRequestHeader &header) | |
QHttpRequestHeader (const QString &str) | |
void | setRequest (const QString &method, const QString &path, int majorVer=1, int minorVer=1) |
QString | method () const |
QString | path () const |
int | majorVersion () const |
int | minorVersion () const |
QString | toString () const |
QHttpRequestHeader () | |
QHttpRequestHeader (const QString &method, const QString &path, int majorVer=1, int minorVer=1) | |
QHttpRequestHeader (const QHttpRequestHeader &header) | |
QHttpRequestHeader (const QString &str) | |
void | setRequest (const QString &method, const QString &path, int majorVer=1, int minorVer=1) |
QString | method () const |
QString | path () const |
int | majorVersion () const |
int | minorVersion () const |
QString | toString () const |
Métodos protegidos | |
bool | parseLine (const QString &line, int number) |
bool | parseLine (const QString &line, int number) |
The QHttpRequestHeader class contains request header information for HTTP.
network.
This class is used in the QHttp class to report the header information if the client requests something from the server.
HTTP requests have a method which describes the request's action. The most common requests are "GET" and "POST". In addition to the request method the header also includes a request-URI to specify the location for the method to use.
The method, request-URI and protocol-version can be set using a constructor or later using setRequest(). The values can be obtained using method(), path(), majorVersion() and minorVersion().
This class is a QHttpHeader subclass so that class's functions, e.g. setValue(), value(), etc. are also available.
QHttpRequestHeader::QHttpRequestHeader | ( | ) |
Constructs an empty HTTP request header.
QHttpRequestHeader::QHttpRequestHeader | ( | const QString & | method, |
const QString & | path, | ||
int | majorVer = 1 , |
||
int | minorVer = 1 |
||
) |
Constructs a HTTP request header for the method method, the request-URI path and the protocol-version majorVer and minorVer.
QHttpRequestHeader::QHttpRequestHeader | ( | const QHttpRequestHeader & | header | ) |
Constructs a copy of header.
QHttpRequestHeader::QHttpRequestHeader | ( | const QString & | str | ) |
Constructs a HTTP request header from the string str. The str should consist of one or more "\r\n" delimited lines; the first line should be the request-line (format: method, space, request-URI, space HTTP-version); each of the remaining lines should have the format key, colon, space, value.
QHttpRequestHeader::QHttpRequestHeader | ( | ) |
QHttpRequestHeader::QHttpRequestHeader | ( | const QString & | method, |
const QString & | path, | ||
int | majorVer = 1 , |
||
int | minorVer = 1 |
||
) |
QHttpRequestHeader::QHttpRequestHeader | ( | const QHttpRequestHeader & | header | ) |
QHttpRequestHeader::QHttpRequestHeader | ( | const QString & | str | ) |
int QHttpRequestHeader::majorVersion | ( | ) | const [virtual] |
Returns the major protocol-version of the HTTP request header.
Implementa QHttpHeader.
int QHttpRequestHeader::majorVersion | ( | ) | const [virtual] |
Returns the major protocol-version of the HTTP header.
Implementa QHttpHeader.
QString QHttpRequestHeader::method | ( | ) | const |
QString QHttpRequestHeader::method | ( | ) | const |
Returns the method of the HTTP request header.
int QHttpRequestHeader::minorVersion | ( | ) | const [virtual] |
Returns the minor protocol-version of the HTTP request header.
Implementa QHttpHeader.
int QHttpRequestHeader::minorVersion | ( | ) | const [virtual] |
Returns the minor protocol-version of the HTTP header.
Implementa QHttpHeader.
Reimplementado de QHttpHeader.
Reimplementado de QHttpHeader.
QString QHttpRequestHeader::path | ( | ) | const |
Returns the request-URI of the HTTP request header.
QString QHttpRequestHeader::path | ( | ) | const |
void QHttpRequestHeader::setRequest | ( | const QString & | method, |
const QString & | path, | ||
int | majorVer = 1 , |
||
int | minorVer = 1 |
||
) |
void QHttpRequestHeader::setRequest | ( | const QString & | method, |
const QString & | path, | ||
int | majorVer = 1 , |
||
int | minorVer = 1 |
||
) |
This function sets the request method to method, the request-URI to path and the protocol-version to majorVer and minorVer.
QString QHttpRequestHeader::toString | ( | ) | const [virtual] |
Reimplementado de QHttpHeader.
QString QHttpRequestHeader::toString | ( | ) | const [virtual] |
Returns a string representation of the HTTP header.
The string is suitable for use by the constructor that takes a QString. It consists of lines with the format: key, colon, space, value, "\r\n".
Reimplementado de QHttpHeader.